Fedora 20 HOWTO – Android Studio

Fedora 20 HOWTO – Android Studio

How to run Android Studio on Fedora 20.

If the error message “JDK Required: ‘tools.jar’ seems to be not in Android Studio classpath. Please ensure JAVA_HOME points to JDK rather than JRE.” shows, then:

  • Download an RPM package of the Oracle JDK from their page (for your architecture i586 for 32bit or x64 for 64bit).
  • Install the rpm
  • Check where the dir prefix, where JDK were installed by “rpm -q –filesbypkg jdk” (In my case: /usr/java/jdk1.7.0_45/)
  • Set the JAVA_HOME variable to point to the Oracle JDK: “export JAVA_HOME=/usr/java/jdk1.7.0_45/
  • To make the changes persistent, continue with:
    • Create a file “/etc/profile.d/java.sh
    • Put the line with path “export JAVA_HOME=/usr/java/jdk1.7.0_45/” in it

 

15 thoughts on “Fedora 20 HOWTO – Android Studio

  1. Thanks for your post. It really works!
    The only thing I do not understand is how to make the changes persistent.

    Could you try to be more clear? Thank you

  2. rpm -q –filesbypkg jdk does not show any result. What could be the problem. I have jdk1.8

  3. The below command worked for me
    JAVA_HOME=/usr/java/jdk1.8.0_25/ sh studio.sh

    Note : Run the above command from the directory android-studio/bin/

  4. Thanks, vineeshvs,
    JAVA_HOME=/usr/java/jdk1.8.0_31/ sh studio.sh
    worked well

  5. Worked fine for me

    used:
    jdk-7u76-linux-x64.rpm (Oracle)
    JAVA_HOME=/usr/java/jdk1.7.0_76/

  6. Thanks. You saved my day
    I did it slightly differently:
    I unpacked the rpm by hand to some spot in my home directory, because i didn’t want to install an outdated Java to the system location.
    Then i had to run “unpack200 NN.pack NN.jar” on the *.pack files in the directory.
    Last: set JAVA_HOME and add $JAVA_HOME/bin to the path only when you need Java 1.7 instead of 1.8 (I.e, when building Android apps)

  7. Awesome, worked for me, just updated the jdk path to the current version I have. I assume that if I update the jdk I’ll need to update the persistent java.sh, correct? Thanks for the fix!

  8. ./studio.sh: /usr/java/jdk1.7.0_79/bin/java: /lib/ld-linux.so.2: bad ELF interpreter: No existe el fichero o el directorio

Comments are closed.

Comments are closed.