Can Android Studio use OpenJDK or does it require Oracle JDK on Linux? Can Android Studio use OpenJDK or does it require Oracle JDK on Linux? linux linux

Can Android Studio use OpenJDK or does it require Oracle JDK on Linux?


No, just as the android documentations says, Oracle JDK is required. I got a "null pointer exception" on render on when running a simple build of an empty project with openJDK. This error probably came from the IDE, not the build of the APK file.

After running studio with Oracle's JDK, it all worked properly with no change to the code.

Actually it gets more complicated than that because, I have both versions on my system. Oracle JDK is used to launch the studio.sh file, but inside studio I still have the OpenJDK specified under "Project Structure> JDK" as:

/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.72-4.b15.fc23.x86_64

I'll report back if this hybrid situation fails.


I am using Android Studio since version 1.0 (currently 2.0 beta) on Fedora 64 bit (currently 23) and OpenJDK. It used to display a warning saying something like "OpenJDK is not supported, do not open bug reports if something goes wrong", I don't know if it it still does (I may have clicked on "Don't show this again").

There was also a warning about libinput but I think it is not related to OpenJDK.

Anyway in my case it works quite well, as far as I can remember I did not have to use special tricks. Obviously your mileage may vary.