Build it via IntelliJ
enter image description here
I tried adding the dependencies slf4j-jdk12 and change the java versions!
i can start an application which i build via the CLI with no problem "grails run-app"
but in IntelliJ it throws the same problem as here
Set Project SDk to compatible Java version. Try using 11 JDK for example:
Verify that modules uses the same JDK:
Also make sure Gradle JVM uses the same JDK:
Related
I am trying to build my java springboot cod using gradle 7 but getting this error while requires Gradle 6.8.x, 6.9.x, or 7.x. The current version is Gradle 5.6. How can i get the latest version of gradle
Hard to tell without much details on the build failure. I had issues myself trying to build in CodeBuild with gradle 7 and I solved by:
Make sure the source code pulled by CodeBuild contains the gradle/wrapper folder and all its contents (including the jar file).
Check in the gradle-wrapper.properties have the distributionUrl to the gradle distribution for your project.
Use ./gradlew build as a command in CodeBuild.
I am using erlang and Kotlin in my project and getting below error
org/intellij/erlang/jps/model/JpsErlangModelSerializerExtension has
been compiled by a more recent version of the Java Runtime (class file
version 55.0), this version of the Java Runtime only recognizes class
file versions up to 52.0
It got fixed in my case by uninstalling Erlang plugin from IntelliJ
IDEA
Preferences → Plugins → Uninstall Erlang
Now, recompile and it should work.
enter image description here
enter image description here
I was trying to download IntelliJ and learn Kotlin, but i get a BUG error before i am starting, and i dont now what to do..
I have try to delete the scipts folder, but it just make a new scipts folder, and say the same error. I have also reinstall IntelliJ, and thats give the same error.
Is der someone there can help me? :-)
Could not open init generic class cache for initialization script 'C:\Users\username\AppData\Local\Temp\wrapper_init4.gradle' (C:\Users\username.gradle\caches\6.6.1\scripts\3yb5naxddghzghazzdf2vk0em).
BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 60
As per the details in your error message, you can see that the root cause is a gradle error.
Gradle is likely using an unsupported version of the JVM in your case (e.g. I could reproduce the error in the latest IntelliJ 2021.3 version where gradle was using JVM 17 from my home path, while the IDE itself was using JDK 11.) In the attached IntelliJ Preferences screen, note that the JVM used by Gradle is specified separately.
To fix the error, verify the JVM version being used by gradle and specify a JVM 11 version to gradle.
IntelliJ Gradle Preferences Screenshot:
You should set these options when you create your project enter image description here
Or, when creating a project, choose Java - Kotlin\JVM
For me this problem occurred when i was using wrong JDK file to build the project that is the Gradle JDK used was a normal SE JDK rather than one preferred by Android Studio so you follow the following steps to solve it.
Go to Settings (ctrl + alt + s)
Go to Build,Execution and Deployment
Then select Build Tools > Gradle
Change Gradle JDK to jbr-17 (the one i am using) you can prefer to choose options from Android studio Java Home or Default JDK
Can't build react native app in android studio.
I tried:
Sync Project with Gradle Files, but I can't do it because of an
error
File -> Invalidate Caches/ Restart
Clear cache from $HOME/.gradle
Delete $HOME/.gradle
Change com.android.tools.build:gradle version on 2.3.0, because it's
the latest version in this list
(https://repo.jfrog.org/artifactory/libs-release-bintray/com/android/tools/build/gradle/), but when I use npx react-native init projectName, used Android Plugin Version 4.1.2, but this version there isn't in this list.
Also know the difference between Gradle, Android Gradle Plugin,
Gradle Wrapper, already read https://developer.android.google.cn/studio/releases/gradle-plugin?hl=en. I tryied to use the latest Gradle v. 6.8.2 and Android Gradle Plugin v. 4.1.2, it also didn't help to build the project.
Change distributionUrl in
projectName/android/gradle/wrapper/gradle-wrapper.properties
Change in File->Settings->Build, Execution, Deployment->Gradle use
Gradle from Specified location and set C:/Gradle/gradle-6.8.2, it didn't help and left it at default
I know there are exactly the same questions on stackoverflow and on github, but the solutions haven't helped.
Build output:
Could not find com.android.tools.build:gradle:4.1.1.
Searched in the following locations:
- https://jcenter.bintray.com/com/android/tools/build/gradle/4.1.1/gradle-4.1.1.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project :react-native-settings
Add google Maven repository and sync project
Open File
Now used:
Gradle v. 6.5
Android Gradle Plugin v. 4.1.2
gradle-wrapper 6.5-all
Android Studios 4.1.2
Android SDK Platform: Android 10, 9, 8.1, 8.0, 7.1.1, 7.0
Your google Maven library is missing. Rebuild project after adding it
Iv'e started to learn and use sbt, so far I didn't start project directly from IntelliJ, what I did was pulling some seed project and using IntelliJ with Scala Plugin as IDE.
As long as I kept pulling seed projects and editing them everything was just fine, but when I tried to generate sbt project directly from IntelliJ I followed simple instructions and faced this error
Error while importing SBT project: Error during sbt execution: No
Scala version specified or detected Java HotSpot(TM) 64-Bit Server VM
warning: ignoring option MaxPermSize=384M; support was removed in 8.0
The auto generated build.properties :
sbt.version = 1.0.3
The auto generated build.sbt :
name := "MyProject"
version := "0.1"
scalaVersion := "2.12.4"
And i'm getting "Cannot resolve symbol" on every property at build.sbt file..
Things Iv'e tried to solve this problem:
Uninstalling and reinstalling IntelliJ, IntelliJ Scala Plugin, sbt and scala
Adding scala under Framework Support
Trying to add scala to Facets at Project Structure (I didn't even have a scala option)
Double checking that scala SDK is configured at Global Libraries at Project Structure with the correct version
My currently environment consist of:
Windows 10
IntelliJ IDEA CE 2017.2.6
IntelliJ Scala Plugin 2017.2.13
Java 8 151
sbt 1.0.3
scala 2.12.4
Thanks!
In order to solve this I :
Completely uninstalled intellij, with all it's configuration
Upgraded to intellij 2017.3 CE