I am very interested in GOOGLE's new Androidstudio, I downloaded it from GOOGLE's official website and installed it (http://developer.android.com/sdk/index.html). I encountered two problems in the middle and found it for a long time to solve it, I just sorted it out, I want to share with you: ANDROID requires JAVA support. For better compilation of Android4.2 (it is said that 1.7 compilation will report an error, but I have never tried it), I am using j of OCRACLE.
I am very interested in GOOGLE's new Android studio, and I downloaded it from GOOGLE's official website to install it (http://developer.android.com/sdk/index.html). I encountered two problems in the middle and found it for a long time to solve, let's sort it out and share it with you:
ANDROID needs JAVA support, in order to Android4.2 better compilation (it is said that 1.7 compilation will report an error, did not try), I here using the OCRACLE company jdk-6u45-linux-x64.bin (http://www.Oracle.com/technetwork/java/javase/downloads/jdk6downloads-1902814.html) This version to install.
Related reading:
Android Studio[Including local download] http://www.linuxidc.com/Linux/2013-05/84408.htm
More about Android Studio: http://www.linuxidc.com/search.aspx? Where = nkey & keyword = 21639
1. Install JDK
First add execution permission: sudo chmod 777 jdk-6u45-linux-x64.bin
Create a folder: sudo mkdir/opt/java"This is worth noting, because intel lij only supports three paths for path identification. For all, install JDK in one of the three paths:/usr/java
Or /opt/java
Or/usr/lib/jvm
I have a problem here.
Move to the directory to install: sudo mv jdk-6u45-linux-x64.bin/opt/java
Sudo/opt/java/jdk-6u45-linux-x64.bin
The task of this installation package is completed, scan: sudo rm-f/opt/java/jdk-6u45-linux-x64.bin
2. Configure JDK
Sudo gedit ~ /. Bashrc plus:
# Set java environment
Export JAVA_HOME =/opt/java/jdk1.6.0 _ 45
Export JRE_HOME = $ JAVA_HOME/jre
Export CLASSPATH = $ CLASSPATH: $ JAVA_HOME/lib: $ JRE_HOME/lib
Export PATH = $ PATH: $ JAVA_HOME/bin: $ JRE_HOME/bin: $ JAVA_HOME/lib: $ JAVA_HOME
Sudo gedit/etc/environment plus:
JAVA_HOME =/opt/java/jdk1.6.0 _ 45 "is the second problem I encountered. I don't know why. At first, I configured the top edge in/etc/profile ~ /. The section added by bashrc does not work. If the JAVA_HOME item cannot be found, the file is directly saved and android studio can be started. And then moved the configuration items of/etc/profile ~ /. Bashrc. I am still very white. I still don't know why I can't read the configuration items of/etc/profile. Maybe I didn't update the environment variable? I can help you back it.
3. Install Android Studio
Sudo mv android-studio-bundle-130.677228-linux.tgz/opt/"" I used the Document Manager to uncompress and move it over
Sudo tar zxvf android-studio-bundle-130.677228-linux.tgz
You can change the directory name to sudo mv/opt/and.../opt/android-studio.
Cd/opt/android-studio/bin
Ls
Sudo studio. sh
OK, the installation is complete, and you can use it yourself later ~~~
I have only encountered these two problems. I 'd like to share them with you. If you have any questions, I 'd like to share them with you ~
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2