I am very new in Android Studio
. I have a problem with gradle
.
it says,
Error:Invalid Gradle JDK configuration found.
Platform SDK
SIMPLE SOLUTION:
THANKS :)
Under Android Studio, select File > Project Structure > JDK location
.
Specify the JDK to the folder of your currently installed JDK. And specify the SDK location as well.
If you want / need to, update your JDK installation to the version that you want to use.
Next, find the version for your current JDK installation by running javac -version
or java -version
. Check that it is what you expect.
Next, find the JDK installation directory:
Next, start Android Studio, and go to the "File->Project Structure->JDK Location" preference page.
The file path given by the preference should be the path to the JDK installation director that you identified above. If it isn't then update it.
Notes:
The simple and easy way is
Go To Your build.gradle(Module:app) At the top right corner you will find notification JDK is missing or download missing JDK Clik on that notification and download JDK and Sync Project.
For me the problem appeared after updating IntelliJ to version 2020.2.1.
Just solved it by going to Project Structure -> SDK. There I only had the Java jdk. I've added IntelliJ IDEA Platform Plugin SDK and that seems to have solved the problem. gradle loads just fine.
Same error i got when I install android studio on my pc . at the time of installation I have installed android sdk and android studio in different path so In project structure I have set my new sdk path . Still I got message of invalid jdk ...then I knew location of jdk ,again in project structure I have set my jdk path.It works.