when I want to check my answer(hyperskill practice) in IDE, gradle do not finished and an error has accrued. the error is :
Failed to launch checking
FAILURE: Build failed with an exception.
What went wrong:
Gradle could not start your build.
Cannot create service of type BuildTreeActionExecutor using method LauncherServices$ToolingBuildTreeScopeServices.createActionExecutor() as there is a problem with parameter #18 of type List.
Could not create service of type ConfigurationCacheProblems.
> io/usethesource/capsule/Set$Immutable
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 3s
Starting a Gradle Daemon, 2 incompatible Daemons could not be reused, use --status for details
I change gradle dependency from release to master, invalidate cache, restart the intellij, restart computer, change java version, but my problem has not solved
Go to a Gradle cache directory ~/.gradle/caches/ and move it somewhere else or delete it.
Then select JDK 17 as Gradle JVM in Settings/Preferences | Build, Execution, Deployment | Build Tools | Gradle.
After that, ensure that JDK 17 is selected as Project SDK in File | Project Structure.
Related
cordova.cmd build android --release
The "" tags were detected and are no longer supported. Please migrate to the "preference" tag "AndroidWindowSplashScreenAnimatedIcon".
cordova-plugin-androidx-adapter: Processed 34 source files in 588ms
Checking Java JDK and Android SDK versions
ANDROID_HOME=C:\Users\iamsh\AppData\Local\Android\Sdk (recommended setting)
ANDROID_SDK_ROOT=C:\android-sdk-windows (DEPRECATED)
Using Android SDK: C:\android-sdk-windows
Subproject Path: CordovaLib
Subproject Path: app
FAILURE: Build failed with an exception.
Where:
Build file 'C:\Webtrikon\quickchicken\platforms\android\build.gradle' line: 21
What went wrong:
A problem occurred evaluating root project 'Quick Chicken'.
Could not resolve all files for configuration 'classpath'.
Could not resolve io.github.g00fy2:versioncompare:1.5.0.
Required by:
unspecified:unspecified:unspecified
> Could not resolve io.github.g00fy2:versioncompare:1.5.0.
> Could not get resource 'https://repo.maven.apache.org/maven2/io/github/g00fy2/versioncompare/1.5.0/versioncompare-1.5.0.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/io/github/g00fy2/versioncompare/1.5.0/versioncompare-1.5.0.pom'.
> The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.4.2/userguide/build_environment.html#gradle_system_properties
> Remote host terminated the handshake
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.4.2/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 3s
Command failed with exit code 1: C:\Webtrikon\quickchicken\platforms\android\gradlew :app:bundleRelease -b C:\Webtrikon\quickchicken\platforms\android\build.gradle
[ERROR] An error occurred while running subprocess cordova.
cordova.cmd build android --release exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
how to solve this error, Stuck with it from past 4 days.
I have so far used maven to build the java code.
I was trying to build this project which is using gradle: https://github.com/opendistro-for-elasticsearch/anomaly-detection
I followed the below steps and it is failing continuously in build.
After cloning the code,
Step 1: As per the steps mentioned in the link, I installed java first and set the Java home and path like below
yum install java-1.8.0-openjdk
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk
export PATH=$JAVA_HOME/bin:$PATH
Step 2 : I tried to build the project using gradlew like below and end up with the error,
anomaly-detection]# ./gradlew
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
FAILURE: Build failed with an exception.
* Where:
Build file '/host/eclipse_back/opendistro/anomaly-detection/build.gradle' line: 55
* What went wrong:
A problem occurred evaluating root project 'opendistro-anomaly-detection'.
> Failed to apply plugin [id 'elasticsearch.esplugin']
> Could not create plugin of type 'PluginBuildPlugin'.
> Could not generate a decorated class for type PluginBuildPlugin.
> org/elasticsearch/gradle/plugin/PluginPropertiesExtension has been compiled by a more recent version of the Java Runtime (class file version 54.0), this version of the Java Runtime only recognizes class file versions up to 52.0
* 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 8s
Why it's failing? Any help is appreciated!
Thanks,
Harry
You need to setup your build environment for gradle to use a more recent java version. You can set the java version with the gradle property org.gradle.java.home:
org.gradle.java.home=<path to JDK home>
I think the problem is that you use Java 8 and in the README they want to use Java 14.
To build from command line set JAVA_HOME to point to a JDK 14 before running ./gradlew
Then it should be possible to build and test the project with the following command:
./gradlew build
EDIT:
Can you check your configuration of your IDE. Did the Gradle JVM use the correct Java version? If you are using Intellik you can check it following this post:
I am trying to create a Minecraft Mod using VSCode as this is my main editor for school, but when I try to run the command gradlew genVSCodeRun I get the follwoing output that says successful, but also "Could not resolve: net.minecraftforge:forge:1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3". When I then run gradlew build, the following it output:
Task :compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all files for configuration ':compileClasspath'.
Could not find net.minecraftforge:forge:1.15.2-31.1.0_mapped_snapshot_20200119-1.14.3.
Searched in the following locations:
- file:/C:/Users/eabla/.gradle/caches/forge_gradle/bundeled_repo/net/minecraftforge/forge/1.15.2-31.1.0_mapped_snapshot_20200119-1.15/forge-1.15.2-31.1.0_mapped_snapshot_20200119-1.14.3.pom
- file:/C:/Users/eabla/.gradle/caches/forge_gradle/bundeled_repo/net/minecraftforge/forge/1.15.2-31.1.0_mapped_snapshot_20200119-1.15/forge-1.15.2-31.1.0_mapped_snapshot_20200119-1.14.3.jar
- https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.14.3.2-31.1.0_mapped_snapshot_20200119-1.14.3/forge-1.14.3.2-31.1.0_mapped_snapshot_20200119-1.14.3.pom
- https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.14.3.2-31.1.0_mapped_snapshot_20200119-1.14.3/forge-1.14.3.2-31.1.0_mapped_snapshot_20200119-1.14.3.jar
- https://libraries.minecraft.net/net/minecraftforge/forge/1.14.3.2-31.1.0_mapped_snapshot_20200119-1.14.3/forge-1.14.3.2-31.1.0_mapped_snapshot_20200119-1.14.3.jar
- https://repo.maven.apache.org/maven2/net/minecraftforge/forge/1.14.3.2-31.1.0_mapped_snapshot_20200119-1.14.3/forge-1.14.3.2-31.1.0_mapped_snapshot_20200119-1.14.3.pom
- https://repo.maven.apache.org/maven2/net/minecraftforge/forge/1.14.3.2-31.1.0_mapped_snapshot_20200119-1.14.3/forge-1.14.3.2-31.1.0_mapped_snapshot_20200119-1.14.3.jar
Required by:
project :
* 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 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.9/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 40s
1 actionable task: 1 executed
Any idea what this could be? I have done a fresh install of java JDK and JRE as well as a fresh install of the Forge MDK.
Your Forge Library is missing. Run the command gradlew eclipse after navigating into your project directory. It may take some time but it will surely fix it. :D
Make sure you have the JDK (java development kit https://www.oracle.com/java/technologies/javase-jdk8-downloads.html) installed not just the JRE
I had a look to doc Build from Source. I cloned repository, checked out master and tried to build project by executing
$ ./gradlew build
but i got error
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/5.6.4/userguide/gradle_daemon.html.
Daemon will be stopped at the end of the build stopping after processing
> Task :spring-aspects:compileAspectj FAILED
[warning] couldn't find aspectjrt.jar on classpath, checked: C:\Program Files\Java\jdk1.8.0_212\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_212\jre\lib\rt.jar;C:\Program Files\Java\jdk1.8.0_212\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.8.0_212\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_212\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_212\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_212\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_212\jre\classes;E:\git\spring-framework\spring-orm\build\libs\spring-orm-5.2.2.BUILD-SNAPSHOT.jar;E:\git\spring-framework\spring-jdbc\build\libs\spring-jdbc-5.2.2.BUILD-SNAPSHOT.jar;E:\git\spring-framework\spring-tx\build\libs\spring-tx-5.2.2.BUILD-SNAPSHOT.jar;E:\git\spring-framework\spring-beans\build\libs\spring-beans-5.2.2.BUILD-SNAPSHOT.jar;E:\git\spring-framework\spring-core\build\libs\spring-core-5.2.2.BUILD-SNAPSHOT.jar;E:\git\spring-framework\spring-core\build\libs\spring-cglib-repack-3.3.0.jar;E:\git\spring-framework\spring-core\build\libs\spring-objenesis-repack-3.1.jar;E:\git\spring-framework\spring-jcl\build\libs\spring-jcl-5.2.2.BUILD-SNAPSHOT.jar;C:\Program Files\Java\jdk1.8.0_212\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_212\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_212\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_212\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_212\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_212\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_212\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_212\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_212\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_212\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_212\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_212\jre\lib\ext\zipfs.jar;E:\git\spring-framework\spring-orm\build\libs\spring-orm-5.2.2.BUILD-SNAPSHOT.jar;C:\Users\Витек\.gradle\caches\modules-2\files-2.1\org.aspectj\aspectjweaver\1.9.4\9205229878f3d62fbd3a32a0fb6be2d6ad8589a9\aspectjweaver-1.9.4.jar;C:\Users\Витек\.gradle\caches\modules-2\files-2.1\com.google.code.findbugs\jsr305\3.0.2\25ea2e8b0c338a877313bd4672d3fe056ea78f0d\jsr305-3.0.2.jar;C:\Users\Витек\.gradle\caches\modules-2\files-2.1\org.aspectj\aspectjrt\1.9.4\7efb30f3259d13472ee0f92bef4319fda700f522\aspectjrt-1.9.4.jar;E:\git\spring-framework\spring-jdbc\build\libs\spring-jdbc-5.2.2.BUILD-SNAPSHOT.jar;E:\git\spring-framework\spring-tx\build\libs\spring-tx-5.2.2.BUILD-SNAPSHOT.jar;E:\git\spring-framework\spring-beans\build\libs\spring-beans-5.2.2.BUILD-SNAPSHOT.jar;E:\git\spring-framework\spring-core\build\libs\spring-core-5.2.2.BUILD-SNAPSHOT.jar;E:\git\spring-framework\spring-core\build\libs\spring-cglib-repack-3.3.0.jar;E:\git\spring-framework\spring-core\build\libs\spring-objenesis-repack-3.1.jar;E:\git\spring-framework\spring-jcl\build\libs\spring-jcl-5.2.2.BUILD-SNAPSHOT.jar;E:\git\spring-framework\spring-context-support\build\libs\spring-context-support-5.2.2.BUILD-SNAPSHOT.jar;E:\git\spring-framework\spring-context\build\libs\spring-context-5.2.2.BUILD-SNAPSHOT.jar;E:\git\spring-framework\spring-aop\build\libs\spring-aop-5.2.2.BUILD-SNAPSHOT.jar;C:\Users\Витек\.gradle\caches\modules-2\files-2.1\javax.cache\cache-api\1.1.0\77bdcff7814076dfa61611b0db88487c515150b6\cache-api-1.1.0.jar;C:\Users\Витек\.gradle\caches\modules-2\files-2.1\javax.transaction\javax.transaction-api\1.3\e006adf5cf3cca2181d16bd640ecb80148ec0fce\javax.transaction-api-1.3.jar;E:\git\spring-framework\spring-expression\build\libs\spring-expression-5.2.2.BUILD-SNAPSHOT.jar
[error] classpath error: unable to find org.aspectj.lang.JoinPoint (check that aspectjrt.jar is in your classpath)
1 error, 1 warning
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':spring-aspects:compileAspectj'.
> Compilation failed with exit code 1; 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. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 0s
133 actionable tasks: 5 executed, 128 up-to-date
But when i exclude spring-aspect tasks build is ok
$ ./gradlew -x :spring-aspects:compileAspectj -x :spring-aspects:compileTestAspectj build
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: http/docs.gradle.org/5.6.4/userguide/gradle_daemon.html.
Daemon will be stopped at the end of the build stopping after processing
BUILD SUCCESSFUL in 5m 25s
200 actionable tasks: 5 executed, 195 up-to-date
Intellij IDEA configuration doc contains information
When prompted exclude the spring-aspects module (or after the import via File-> Project Structure -> Modules)
Should Build from Source doc be updated or there is other problem?
Settings GRADLE_USER_HOME env variable to path, containing only ascii chars fixes problem
$ GRADLE_USER_HOME=/e/.gradle ./gradlew build
Starting a Gradle Daemon, 1 busy Daemon could not be reused, use --status for details
BUILD SUCCESSFUL in 4m 25s
203 actionable tasks: 4 executed, 199 up-to-date
I've been using AndroidStudio and it has a few inconsistencies but it's very good already.
I've been compiling and running my app fine and then suddenly (after doing something innocuous) it's throwing up the below error but i cannot find out the issue. Does anyone have any ideas how to find out the errors?
Compilation completed with 2 errors and 0 warnings in 46 sec
2 errors
0 warnings
Gradle:
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':Candle: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.
If nothing has really changed in your project settings, then I'd check the log (Help | Show log in Files/Explorer/Finder) for clues. Most likely, the Gradle daemon died, and a rebuild should fix it.
If that doesn't help, then your only option to find more info is to do a command line build. Go to the root of your project, and do:
./gradlew assemble
The best way I've found to get to the errors is to run gradle compile and/or package from the command line. In the root of your project run:
gradlew compileDebug
AND / OR
gradlew packageDebug
This will give you command line output for your errors
It also sometimes helps to run a gradle clean before running builds:
gradle clean
Hope this helps