1

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?

8
  • did you set the JAVA_HOME environment?
    – Rafael
    Aug 9, 2015 at 9:18
  • I used apt-get to install JDK as instructed here
    – Crutchcorn
    Aug 9, 2015 at 9:31
  • please run echo $JAVA_HOME in your terminal. Do you get a valid path to your Java binaries?
    – Rafael
    Aug 9, 2015 at 9:36
  • No I don't.. Strange... Let me do that real quick
    – Crutchcorn
    Aug 9, 2015 at 9:45
  • Did me no good. Still getting the same error.
    – Crutchcorn
    Aug 9, 2015 at 9:50

1 Answer 1

2

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/)

1
  • The second part of your answer solved it! Thank you so much!
    – Crutchcorn
    Aug 9, 2015 at 22:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.