New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unsupported major.minor version 52.0 2.5.0 #74
Comments
I am getting exactly the same error with same setup |
Same here.
|
What version of java are you running gradle with? |
I tried both 1.7.0.65 and 1.8.0.25. Both Java and windows 8.1 are 64 bits |
I ran into this as well. The interesting tidbit I have to contribute is that NOT having a |
@fada21 solution doesn't work for me because I've already set it to the same path. |
Any progress on this issue? I`m experiencing same problem on my Ubuntu machine: Environmentexport JAVA_HOME="/usr/lib/jvm/java-7-oracle"
export JAVA6_HOME="/usr/lib/jvm/java-6-oracle"
export JAVA7_HOME="/usr/lib/jvm/java-7-oracle"
export JAVA8_HOME="/usr/lib/jvm/java-8-oracle" Gradle scriptbuildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
classpath 'me.tatarka:gradle-retrolambda:2.5.0'
}
}
apply plugin: 'com.android.library'
apply plugin: 'me.tatarka.retrolambda'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
minSdkVersion 15
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
retrolambda {
jdk System.getenv("JAVA8_HOME")
oldJdk System.getenv("JAVA6_HOME")
javaVersion JavaVersion.VERSION_1_6
}
dependencies {
compile project(":rest")
compile 'com.jakewharton.timber:timber:2.5.0'
compile 'io.reactivex:rxandroid:0.23.0'
compile 'com.squareup.retrofit:retrofit:1.8.0'
}
Any explanation what does this message really mean? |
Just a heads up, it was as simple as changing the SDK path in project settings to point to my JDK 8 home directory. I had started my project before including this plugin and was at that pointed to 7, but during setup for this library installed 8, but didn't update my project settings. Updating the path fixed the issue for me. HTH |
@tomkoptel Have you changed SDK path in project settings as @bennythomps said? I've posted previously an image with hint how it should look like. |
Yep, that helped me :) At the moment I'm using ./your_location/android-studio/bin/studio.sh & Though the final step was changing JDK location in module settings in Android Studio as suggested @fada21. |
For us the issue was a java-library that was part of an Android project. For whatever reason it believed it was jdk 6, and the sdk wasn't around. There definitely should more logging around failures in the plugin itself but we were able to get things running by adding this to the library:
|
On top of making sure |
I fixed this by changing module's Java SDK path to JDK *8 this thing must be included to README |
Hi all org.gradle.java.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home to my |
@hamen thanks, that worked... |
@magicgoose Your solution worked. Cheers! |
setting org.gradle.java.home works for me. |
For me the only thing that worked was setting adding:
To
And then, restart IntelliJ, obviously. I have found this here. I am a Mac OS X (10.9 - Mavericks) user. If you want to automatically update all your IntelliJs installations, I have made a script to do so here: Note that if you ever update your jdk 8 version, you should update the file as well. |
Sorry for the delay, but I think I got to the bottom to this. The latest version of gradle-retrolambda was compiled with java 8, making it not work if you ran gradle with a lower java version. All the workarounds above ensure that you are running gradle with java 8. Since my intention was to allow you to run gradle with a lower java version (as long as it can find java 8 to actually compile your source code), this will be fixed in the next version. |
Fixed in 3.0.0 |
I have the trable ( I try to use Solution: export JAVA_HOME=$JAVA8_HOME |
Also be sure you are not using "Android version to use when rendering layouts in IDE" button with Andriod N (preview) set, choose another version. |
I solved this by installing Java 8 and changing the JDK location to the new Java 8, rebuilt gradle and everything worked perfectly. |
Unset JAVA_HOME and JAVA8_HOME, set JDK8 path in Android studio project settings. Restart android studio if you unset JAVA_HOME while android studio is running. |
wait, what? someone does still use it for Android development? why? |
Change build gradle version it's work for me |
I also faced the same problem, it can be solved by following two steps: Step 1: Download Java 8. |
Note that current Anndroid tools/google libraries require JDK8 or you will get "Unsupported major.minor version 52.0". This is true even if you are not using Retrolambda. |
Adding this line to
|
I met this issue too |
I was wondering if Java7 works in the issue. It does not work in my win7/JDK1.7, anyone knows? |
For me I just had to restart Android Studio, lol. |
Hi All, I was also facing same issue:
I just updated JDK location on below setting(from "JDK 1.7" to "C:\Program Files\Android\Android Studio" and select the check box for Embedded JDK). File->Other Settings=>Default Project Struture |
keep getting error in Android Studio 1.0.1
JAVA7_HOME=C:\Program Files\Java\jdk1.7.0_65
JAVA8_HOME=C:\Program Files\Java\jdk1.8.0_25
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_25
The text was updated successfully, but these errors were encountered: