i just imported some project that i bought from my friend. Once i import it to Android Studio 2.1.2 i just get this messages "Error:Gradle 3.3 requires Java 7 or later to run. You are currently using Java 6."
I have install Java 7 and 8 in my mac. I have change the directory in Default Project Structure, but still that messages always appear and i can't do anything with the code.
Please master, help me.
Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8. You can try some of the following options: - changing the IDE settings.
Gradle can only run on Java version 8 or higher. Gradle still supports compiling, testing, generating Javadoc and executing applications for Java 6 and Java 7.
For Android, performance has been improved for incremental changes in projects, especially those using the Jetifer tool to migrate libraries. Gradle now supports running on and building with Java 16, or Java Development Kit (JDK) 16, which was released on March 16.
Support for Java 17As of Gradle 7.3, both running Gradle itself and building JVM projects with Java 17 is fully supported.
Ran into the same issue, but I needed to keep java 6 for macOS legacy reasons (as I commented on Shubhendu's post). So I ended up downloading java 8 jdk found here
and on android studio 3.3 at least here is the rough path I took:
I right clicked project -> open module settings -> sdk location -> uncheck use embedded jdk -> added path to new 1.8 jdk which for me it was
/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home
Use this path in the Default Project Structure by using the browse option go up to this Directory named home.
/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home
May it works for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With