"Could not open init generic class cache for initialization script" - kotlin

Hi everyone am new to Kotlin language , i have encountered some errors in the process of running the Hello World code.
Could not open init generic class cache for initialization script 'C:\Users\HP\AppData\Local\Temp\wrapper_init.gradle' (C:\Users\HP.gradle\caches\6.8\scripts\5mjee5vr2mabvvexqryui51pg).
BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 60
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.
Any help will be appreciated. Thanks in advance

I caught this problem by downloading a different version of Java. I had version 16 installed, however the IDE (IntelliJ) warned me that Gradle was not compatible with this latest version, so I installed version 11. If the configuration of the project points to version 11, and that error that you show in console was corrected.
Here is the link to the OpenJDK: https://jdk.java.net/archive/

Related

React Native FAILURE: Build failed with an exception. I need someone to look at this?

What went wrong:
Could not open settings generic class cache for settings file 'C:\Users\Nelson Ndimba\Documents\MTN-YelloHive\android\settings.gradle' (C:\Users\Nelson Ndimba.gradle\caches\7.1.1\scripts\4gzdkdviqbv5h262ml6gwf2d7).
BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 63
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
i think the problems come from your Java version.
did you install JDK11 as mentioned in the CLI project set up ?
if yes and the problem is always there then make sure to add a variable envirenement to your system named JAVA_HOME with value :
"C:\Program Files\Eclipse Adoptium\jdk-11.0.16.101-hotspot"
Note 1: make sure to restart you PC after this.
Note 2: the path may change based on the jdk 11 subversion and where your system stores installed software

How to skip tests in release part of build

We are currently using gradle-release-plugin.
Our release builds are twice as long due to unit and integration tests being run on both "SNAPSHOT" version and after the branch is "tagged".
here is the command line we execute in our release trigger:
./gradlew --info clean build release -Prelease.useAutomaticVersion=true
I read the plugin code and the doc and found "buildTasks" configuration but didn't find documentation or examples on them.
I'm sure we do something wrong but can't figure out what.
Thanks in advance

Gradle/Grails: Task 'start' not found in project ':client'

I followed the following guide to create a Grails Project with Vue Profile. https://grails-profiles.github.io/vue/latest/guide/
First:
When i run ./gradlew server:bootRun the process is stuck at 85%, but correctly displays Grails application running at http://localhost:8080 in environment: development and the localhost page is accessible.
Then:
When running ./gradlew client:start, the build Fails stating:
Starting a Gradle Daemon, 1 busy and 2 stopped Daemons could not be reused, use --status for details
FAILURE: Build failed with an exception.
* What went wrong:
Task 'start' not found in project ':client'.
* 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
The funny thing is it worked before, but as i decided to start over i deleted the project folder and created a new one according to the guide, it wasn't working anymore.
Has anyone experienced a similar error?
When i run ./gradlew server:bootRun the process is stuck at 85%, but
correctly displays Grails application running at http://localhost:8080
in environment: development and the localhost page is accessible.
If you are asking if that indicates something is wrong, it doesn't. That is expected behavior. It never gets to 100% because the task is running as long as the app is running.
Then: When running ./gradlew client:start, the build Fails stating:
That is likely a mistake in the docs. ./gradlew client:serve should work.
Has anyone experienced a similar error?
Likely yes. We will get the docs updated.

java does not run with j-grasp on my iMac

I am getting this error when I try to run Java with j-grasp:
----jGRASP wedge: exit code for process is 1.
----jGRASP: operation complete.
----jGRASP exec: javac -g Palindrome.java
The operation couldn’t be completed. Unable to locate a Java Runtime that supports javac.
Please visit http://www.java.com for information on installing Java.
----jGRASP wedge: exit code for process is 1.
----jGRASP: operation complete.
The simplest solution is to download and install one of the "bundled" versions of jGRASP, which comes with Java and will prefer that java and javac over all others.
If you are unable to do that, you can turn on "Settings" > "Verbose Messages" in jGRASP then compile to see what "javac" is actually running ("actual command sent" in the verbose output). Most likely it is not a "normal" javac, since the error message doesn't look like I would expect - I don't know what this "java.com" website is. If you do have a normal Java installation, deleting that rogue "javac" may fix the problem.

intelliJidea plus Gradle, where can i find Compiler Ouput?

Don't know if this is because android-studio does something wrong, or just common to all gradle projects in intelliJ, but sometimes when i run the build/debug, all I get is:
Gradle:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':ProjectA: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.
I can't seem to find any way to get more information, as this text already appear on what i consider to be the compiler output.
Where should I be looking at?
One thing I've done to get some better information is go to the project root via the command line and run
gradlew compileDebug
this does give more information, but I'm not 100% sure its running the same command as the IDE.