For a complete evaluation of your problem, here are some things you need to check to make sure you have what it takes:
Instructions for Fedora Linux
Verify that you have the jdk
package installed:
rpm -qa | grep jdk
If it is not installed, you will have to install it:
- Download the appropriate package for your system from the Oracle site >
-
Switch to root
sudo -i
## ou ##
su -
-
Install the package you downloaded
## JDK 32-bit ##
rpm -Uvh /caminho/para/binario/jdk-7u51-linux-i586.rpm
## JDK 64-bit ##
rpm -Uvh /caminho/para/binario/jdk-7u51-linux-x64.rpm
## JRE 32-bit ##
rpm -Uvh /caminho/para/binario/jre-7u51-linux-i586.rpm
## JRE 64-bit ##
rpm -Uvh /caminho/para/binario/jre-7u51-linux-x64.rpm
Check the current installation:
java -version
It should look something like this:
java version "1.7.0_51"
Java (TM) SE Runtime Environment (build 1.7.0_51)
Java HotSpot (TM) 64-Bit Server VM (build 22.1, mixed mode)
Check which compiler:
javac -version
It should look something like this:
javac 1.7.0_51
Adds JAVA_HOME
to the environment variable:
Most common is to edit the .bashrc
file in your user directory:
gedit ~/.bashrc
And add to the end of it:
JAVA_HOME=/usr/lib/jvm/java-<versão>
Note: After this you may need to re-log in for the changes to be made.
Original answer
Your problem is usually in the form of a permissions issue.
Try changing the permissions of the folder:
chown -R root:root /caminho/para/android-studio
Solution credit for SOINC given by @nikodroid
>