I am very new in Android Studio
. I have a problem with gradle
.
it says,
Error:Invalid Gradle JDK configuration found.
Platform SDK does not point to valid `JDK` `(C:/Program Files/Java/jdk1.8.0_20)`.
Consult IDE log for more details (Help | Show Log)
then what should I do to solve that?
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:
- It should be on your %PATH%.
- By default it will be a subdirectory of "C:\Program Files\Java"' for example: "C:\Program Files\Java\jdk1.8.0_45"
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:
- Use the full pathname of the installation directory; e.g. "C:\Program Files\Java\jdk1.8.0_45".
- Use a pathname, not a URL.
When I encountered this same problem, I solved it by specifying the path to the portable (non installed) JDK8.
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.