Error to run Android Studio

后端 未结 17 2141
执笔经年
执笔经年 2020-12-22 17:43

I have installed Android Studio and I followed all steps described here

But when I start studio.sh I got an error with this message:

17条回答
  •  感动是毒
    2020-12-22 18:28

    First check if the Java JDK is installed correctly:

    dpkg --list | grep -i jdk
    

    If not, install the JDK:

    1. Download the latest version of the JDK from Oracle: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

    2. Extract it to the appropriate location in your machine. Get the extract location:

      vi ~/.bashrc or vi ~./ bash_profile

      JAVA_HOME=/home/user/installs/jdk1.7.0_40
      PATH=$JAVA_HOME/bin
      

      source ~/.bashrc or source ~/.bash_profile

    3. After the installation you can check it:

      java -version
      which java
      

      If all things are correct then the right the answer should be something like this:

      java version "1.7.0_40"
      Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
      Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)

    4. Append the following statement to studio.sh the file in android-studio/bin directory:

      JAVA_HOME=/home/user/installs/jdk1.7.0_40
      

    Finally start your Android Studio with the following command:

    ./studio.sh 
    

提交回复
热议问题