Skip to content Skip to sidebar Skip to footer

Android Studio Java Error

I had installed OpenJDK7 in my machine for Java programming. Then I removed it and installed Oracle 1.7Jdk. But the problem is Android Studio isn't taking the new JDK. It gives the

Solution 1:

Android-Studio may stores the location of Java in $HOME/.AndroidStudioPreview/config/options/jdk.table.xml

Delete this file and restart Android-Studio, it should now prompt you for your new Java location.

Cheers

Solution 2:

Seems that Android Studio can't find your JDK, probably your system installed it on a different location (and not in "/usr/lib/jvm/java-7-openjdk-i386/bin/java"). I had another problem with Java and Android Studio, but I think the soulution could also work for you. IntelliJ needs a fixed installation of the JDK in one of these locations (found it here):

/usr/java

/opt/java

/usr/lib/jvm

My JDK was in another folder, so I moved it to /usr/java and now it works fine :)

Solution 3:

The location is now:

~/.AndroidStudio/config/options

not

~/.AndroidStudioPreview/config/options

since AS has been officially released.

Post a Comment for "Android Studio Java Error"