After installing Android Studio, I started getting this error:
Error: Could not determine Java version.
upon gradle sync. I do have Java JDK7 installed, OpenJDK, and OpenJSE installed. How can I fix this?
1 Answer
Read this for how to installing JDK on your elementary OS (also it works for java 7).
Then If your problem still appears then go to Configure -> Project defaults -> Project structure -> SDK Location
in welcome screen and add your JDK path. (Usually on /usr/lib/jvm/jdk1.x.y/
)
-
The second part of your answer solved it! Thank you so much! Commented Aug 9, 2015 at 22:53
JAVA_HOME
environment?echo $JAVA_HOME
in your terminal. Do you get a valid path to your Java binaries?