I've recently updated the gradle version in a project to 2.13. Since doing so attempts to run any builds, tests, whatnot give me this error:
FAILURE: Build failed with an exception.
* What went wrong:
org/gradle/platform/base/internal/toolchain/ToolResolver
> org.gradle.platform.base.internal.toolchain.ToolResolver
* Try:
Run with --info or --debug option to get more log output.
* Exception is:
java.lang.NoClassDefFoundError: org/gradle/platform/base/internal/toolchain/ToolResolver
The only gradle reference to ToolResolver appears to be in the Java plugin. Is it possible that the plugin is corrupted somehow?
Suggestions on how to fix this?
Try to upgrade Gradle to the latest version
Related
I'm on windows 10, when I do "gradlew genSources" then this happened
Starting a Gradle Daemon, 7 stopped Daemons could not be reused, use --status for details
> Configure project :
Fabric Loom: 0.10.66
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\user\Downloads\MCJAVA\vector-addon\build.gradle'
* What went wrong:
Could not compile build file 'C:\Users\user\Downloads\MCJAVA\vector-addon\build.gradle'.
> startup failed:
General error during conversion: Unsupported class file major version 62
java.lang.IllegalArgumentException: Unsupported class file major version 62
1 error
* 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.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 5s
I want to know how can i fix it and im not good at coding and my english is not that good, I still tried with --stacktrace it still have similir error please help me
(its have a lot more text in code but its too much and i dont think it important)
I'm using VS code without Android studio in Ubuntu 20.04. While running the first app in flutter in debugging mode in an real device produced this error given below. I also tried to change my JDK version but it didn't worked.
Launching lib/main.dart on Nokia 6 1 Plus in debug mode...
FAILURE: Build failed with an exception.
* What went wrong:
Could not initialize class org.codehaus.groovy.runtime.InvokerHelper
* 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.
* Get more help at https://help.gradle.org
BUILD FAILED in 12s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 18.3s
Exception: Gradle task assembleDebug failed with exit code 1
Please suggest a solution!
Your gradle sync has failed for some reason.
Do this
File > Open
Navigate to your project
You will see an android folder there open that as project in a new window
Check the gradle sync issues and resolve those
I am using android studio idea for my libgdx project. I configured custom desktop configuration setting
Tasks: desktop:run
Gradle Project: mygame
Running android works fine but running this configuration brings the following error
9:08:42 PM: Executing task 'desktop:run'...
Executing tasks: [desktop:run]
Configuration on demand is an incubating feature. WARNING:
Configuration 'compile' is obsolete and has been replaced with
'implementation'. It will be removed at the end of 2018 Gradle now
uses separate output directories for each JVM language, but this build
assumes a single directory for all classes from a source set. This
behaviour has been deprecated and is scheduled to be removed in Gradle
5.0 at build_4irp102idy0ifcnkhwn53osnp$_run_closure3.doCall(D:\LibgdxProjects\Tembo\desktop\build.gradle:22)
(Run with --stacktrace to get the full stack trace of this
deprecation warning.)
FAILURE: Build failed with an exception.
What went wrong: java.lang.NullPointerException (no error message)
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.
Get more help at https://help.gradle.org
BUILD FAILED in 2s 9:08:45 PM: Task execution finished 'desktop:run'.
Important details
Gradle version: 4.4
How can i fix this. I tried downgrading my gradle version but the minimim supported is 4.4
NOTE: running gradlew desktop:run on project root works.
currently this version of gradle is not supported you can use version 2.3.3
There is an activity to upgrade to Gradle 4.6 which you can follow up here
https://github.com/libgdx/libgdx/issues/5177
I'm trying to package my Grails 3.1.5 application.
Running grails package (or grails war) results in the following:
FAILURE: Build failed with an exception.
* What went wrong:
org.codehaus.groovy.runtime.DefaultGroovyMethods.each(Ljava/util/List;Lgroovy/lang/Closure;)Ljava/util/List;
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 2.205 secs
| Error Command [package] error: Could not execute build using Gradle distribution 'https://services.gradle.org/distributions/gradle-2.6-bin.zip'. (Use --stacktrace to see the full trace)
Running with --stacktrace gives:
Caused by: java.lang.NoSuchMethodError: org.codehaus.groovy.runtime.DefaultGroovyMethods.each(Ljava/util/List;Lgroovy/lang/Closure;)Ljava/util/List;
at asset.pipeline.gradle.AssetCompile.getSource(AssetCompile.groovy:188)
at asset.pipeline.gradle.AssetCompile_Decorated.getSource(Unknown Source)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$PropertyInfo$4.create(AnnotationProcessingTaskFactory.java:460)
at org.gradle.util.SingleMessageLogger.whileDisabled(SingleMessageLogger.java:166)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$PropertyInfo.getValue(AnnotationProcessingTaskFactory.java:458)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$Validator$1.call(AnnotationProcessingTaskFactory.java:262)
My versions are:
| Grails Version: 3.1.5
| Groovy Version: 2.4.6
| JVM Version: 1.8.0_91
I've removed the .gradle cache folder, run a grails clean, but no luck.
Edit: My current solution is to use gradle to build the war; gradle war produces an uber-jar under build that I can use for deployments. Would sure by nice to use grails for this (unless I'm missing something).
I have worked around this by using:
./gradlew clean assemble
This produces a WAR in ./build/libs/.
It's possible this is caused by a bug on in Grails, as discussed here.
In my case, this error cropped up when using an older grails wrapper (grailsw) file. The solution was to use gradlew and the Grails CLI in my path, instead of using the old grailsw.
Gradle:
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':name:compileDebug'.
Compilation failed; see the compiler error output for details.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Try to run "gradlew compileDebug" from the command line to fix this problems. See this answer for more information.
Also make sure to update your gradle plugin to the latest version. (0.4.3 since yesterday)
Use com.android.tools.build:gradle:0.4.+ in your gradle.build file and you'll always get the latest gradle android plugin.