Unable to find method 'org.gradle.api.tasks.compile.CompileOptions.setBootClasspath(Ljava/lang/String;)V'.
Upgrade android Gradle plugin to 3.4.0 version and Gradle 5.1.1
GdxVersion = 1.9.9
Android gradle plugin = 3.4.0
KotlinVersion = 1.3.31
GradleVersion = 5.1.1
Unable to find method 'org.gradle.api.tasks.compile.CompileOptions.setBootClasspath(Ljava/lang/String;)V'.
Possible causes for this unexpected error include:
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)
The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)
Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
Face the same issue, but not sure how to solve this.
Did change the gradleVersion to 5.4.1, same issue.
Any hint?
you should use gradle 4.6 with libgdx projects.
i' m going to test the solution described in the following posts on the libGDX forum: https://www.badlogicgames.com/forum/viewtopic.php?f=11&t=28943 and (referred to) https://www.badlogicgames.com/forum/viewtopic.php?f=11&t=28658. In case it will work, we shall update the gradle files in the snapshot and close the issue !
Hi Yarnee, we're in the same boat. See my answer on:
https://www.badlogicgames.com/forum/viewtopic.php?f=11&t=28658&p=113918#p113918
Searching on my whole computer, i found references for CompileOptions.setBootClasspath only on the .gradle and .AndroidStudio3.4 folders on my user home folder.
Reboot and try open in mac
On Sat, Apr 27, 2019, 3:48 AM Abhishek Aryan notifications@github.com
wrote:
Issue details
Unable to find method
'org.gradle.api.tasks.compile.CompileOptions.setBootClasspath(Ljava/lang/String;)V'.
Reproduction steps/codeUpgrade android Gradle plugin to 3.4.0 version and Gradle 5.1.1
Version of LibGDX and/or relevant dependenciesGdxVersion = 1.9.9
Android gradle plugin = 3.4.0
KotlinVersion = 1.3.31
GradleVersion = 5.1.1
StacktraceUnable to find method 'org.gradle.api.tasks.compile.CompileOptions.setBootClasspath(Ljava/lang/String;)V'.Possible causes for this unexpected error include:Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)Re-download dependencies and sync project (requires network)The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.Stop Gradle build processes (requires restart)Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
Please select the affected platforms
- Android
- iOS (robovm)
- iOS (MOE)
- HTML/GWT
- Windows
- Linux
- MacOS
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/libgdx/libgdx/issues/5617, or mute the thread
https://github.com/notifications/unsubscribe-auth/AJNCWWHKYHTO6GQLI5CTNU3PSQAMFANCNFSM4HI3WASA
.
SampleProject/gradle/wrapper/gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
â–¼ change
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
I removed ios-moe
module and error is gone that mean problem is in ios-moe
module.
Yes, moe is not compatible in latest gradle versions.
Update the classpath 'com.android.tools.build:gradle:3.4.1' to latest version in your project gradle.
@tlshenm Thanks
Update the classpath 'com.android.tools.build:gradle:3.1.0' in your project gradle.
The method setBootClasspath was removed from the class org.gradle.api.tasks.compile.CompileOptions in the gradle version v5.0.0. Using the gradle version below v5.0.0 (i.e. v4.9.0) solved the problem in my case.
ozanurkns answer and tlshenms answer combined worked for me
@ozanurkn and @tlshenm Thanks so much for the replies!
This issue was fixed for me by going to gradle-wrapper.properties and changing distributionUrl=https://services.gradle.org/distributions/gradle-5.1.1-all.zip to
distributionUrl=https://services.gradle.org/distributions/gradle-4.6-all.zip
Then, I went to build.gradle and updated classpath 'com.android.tools.build:gradle:(old version)' to classpath 'com.android.tools.build:gradle:3.1.0'
Then I updated buildToolsVersion '(old version)' to buildToolsVersion '27.0.3'
Build is complete with no errors!
For me, I changed it to
distributionUrl=https://services.gradle.org/distributions/gradle-5.1.1-all.zip
(I needed to use 5.3 because of Kotlin)
And,
classpath 'com.android.tools.build:gradle:3.4.1'
I used 5.1.1 because the project uses higher than 4.6 version.
And solved the problem.
Most helpful comment
SampleProject/gradle/wrapper/gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
â–¼ change
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip