Task 'idea' not found in root project 'Game'.

Anything libgdx related goes here!

Task 'idea' not found in root project 'Game'.

Postby vitalyur » Mon Aug 26, 2019 8:55 am

Hi All,

When building a project with IDEA plugin i get the following issue:
Code: Select all
FAILURE: Build failed with an exception.

* What went wrong:
Task 'idea' not found in root project 'Game'.

* Try:
Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org


I've tried adding an init.gradle with apply plugin: 'idea' to C:\Users\user.gradle to activate the IDEA plugin and now i'm getting:

Code: Select all
FAILURE: Build failed with an exception.

* Where:
Initialization script 'C:\Users\user\.gradle\init.gradle' line: 1

* What went wrong:
A problem occurred evaluating initialization script.
> Failed to apply plugin [id 'org.gradle.idea']
   > Could not create plugin of type 'IdeaPlugin'.
      > Unable to determine constructor argument #3: missing parameter of interface org.gradle.plugins.ide.internal.IdeArtifactRegistry, or no service of type interface org.gradle.plugins.ide.internal.IdeArtifactRegistry

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.


Indeed i'm not seeing task 'idea' in gridlew tasks.

Could you please advise?

Thanks.
vitalyur
 
Posts: 1
Joined: Mon Aug 26, 2019 8:03 am

Re: Task 'idea' not found in root project 'Game'.

Postby BobIsHere » Mon Aug 26, 2019 8:57 pm

I came across this same issue except mine was Task 'eclipse' not found in root project.
This has only happened to me recently when trying to used the latest gdx-setup.jar

The quickest solution I found was to go into the folder where you attempted to build your project and modify the build.gradle.
Adding in "apply plugin: "idea"" under the allprojects section.
For example in my case I modified the section to look as follows.
allprojects {
apply plugin: "eclipse"

version = '1.0'
ext {
appName = "Game"
gdxVersion = '1.9.10'
roboVMVersion = '2.3.7'
box2DLightsVersion = '1.4'
ashleyVersion = '1.7.0'
aiVersion = '1.8.0'
}

repositories {
mavenLocal()
mavenCentral()
jcenter()
google()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
}
}

After it was modified I would have to navigate to the folder in my command prompt and manually run the "gradlew build" command. Followed by "gradlew eclipse".
While i'm not sure if this is the best solution it was at least able to generate the proper IDE files i needed.
BobIsHere
 
Posts: 3
Joined: Mon Aug 26, 2019 8:45 pm

Re: Task 'idea' not found in root project 'Game'.

Postby tomski » Tue Aug 27, 2019 10:04 am

Why are you using the idea task? Just import from the build.gradle.
tomski
 
Posts: 909
Joined: Wed Jun 26, 2013 6:06 pm


Return to Libgdx

Who is online

Users browsing this forum: No registered users and 1 guest