Recently to touch Android programming, originally wanted to install eclipse, accidentally found Android specifically developed tools Android Studio, intended to install the trial
http://www.android-studio.org/
Download Android Studio
There are windows, Mac OS X, Linux versions
I'm under the Linux version.
Android-studio-ide-135.1629389-linux.zip
Extract
Unzip Android-studio-ide-135.1629389-linux.zip
sudo mv android-studio/opt/
CD android-studio/bin/
./studio.sh
There is a mistake, say what java_home wrong
Print its value
Echo $JAVA _home
Found to be
/usr/lib64/jvm/jre
$JAVA _home is pointing to the JRE, no, this should point to the JDK, so you need to install the configuration JDK
From the following URL
Http://www.oracle.com/technetwork/java/javase/downloads/index.html
Download JDK
My 64-bit SuSE, download x64 version
Jdk-8u40-linux-x64.tar.gz
Note The best is the next tar, I use the RPM, will prompt an error
jdk-8u40-linux-x64.rpm
Installation
Rpm-ivh./jdk-8u40-linux-x64.rpm
Error: Dependency detection failed:
/usr/sbin/alternatives is jdk1.8.0_40-2000:1.8.0_40-fcs.x86_64 need
sudo tar-xvf./jdk-8u40-linux-x64.tar.gz-c/opt/java/
Setting environment variables
Add in ~/.BASHRC
#set Java Environment
java_home=/opt/java/jdk1.8.0_40/
Classpath= $JAVA _home/lib/tools.jar
Path= $JAVA _home/bin: $PATH
Export Java_home CLASSPATH PATH
Modify the system default Java to:
sudo update-alternatives--install/usr/bin/java Java/opt/java/jdk1.8.0_40/bin/java 300
sudo update-alternatives--install/usr/bin/javac Javac/opt/java/jdk1.8.0_40/bin/javac 300
sudo update-alternatives--config java
sudo update-alternatives--config javac
Run again./studio.sh
Will always be stuck on "fetching Android SDK component Information"
1) Go to the bin directory in the newly installed Android Studio directory. Locate the Idea.properties file and open it with a text editor.
2) Add a line at the end of the idea.properties file: Disable.android.first.run=true, and then save the file.
3) after shutting down Android studio and restarting, you can enter the interface.
There is a "start a new Android Studio project" option when you enter Android studio, and when you click this option, nothing happens.
This is because the path to the SDK is not set,
http://www.android-studio.org/
Download SDK TOOLS for ANDROID STUDIO
I'm under the android-sdk_r24-linux.tgz.
sudo tar-xvf android-sdk_r24-linux.tgz-c/opt/
To
Http://www.cnblogs.com/bjzhanghao/archive/2012/11/14/2769409.html
Download Platform-tools_r14-linux.zip (this site only has this version of the download)
Unzip Platform-tools_r14-linux.zip
sudo mv platform-tools/opt/android-sdk-linux/
Add in ~/.BASHRC
Path=/opt/android-sdk-linux/tools:/opt/android-sdk-linux/platform-tools: $PATH
Export PATH
Set the path to/opt/android-sdk-linux in Configure-to-project DEFAULTS project structure under Android Studio
This will allow you to create a new project.
If you want to use the emulator on your computer, you need a corresponding version of the system image file, and if you only debug the program on the real machine, you do not need to download the emulator ROM.
The first is to choose the installation directly through the SDK manager in Android Studio, if this method does not (the official website is difficult to connect to) manually download the installation package (can be used Baidu search)
The Sysimg installation method is to create the System-images directory under the root directory of your SDK directory (that is, under the ANDROID-SDK directory), create android-14 subdirectories under the System-images directory, and download the Sysimg_armv7a_ 14_r02.zip
Unzip the file into the directory. For Android-15 also the same operation, but to build android-15 directory (15 this number needs to match the version number of image), the corresponding file is called Sysimg_armv7a-15_r02.zip.
The corresponding version of the Android v4.03 I chose is 15, so I chose to download sysimg_armv7a-15_r02.zip
I was to
Http://dl.vmall.com/c01mrjmpu3
Download
Sysimg_armv7a-15_r02.zip
Mkdir/opt/android-sdk-linux/system-images/android-15
Unzip Sysimg_armv7a-15_r02.zip
MV armeabi-v7a//opt/android-sdk-linux/system-images/android-15/
Because of the wall, some resources are not good through the official download installation, only in the Web site search, installation process a bit tortuous, but finally completed
From: http://blog.chinaunix.net/uid-20680966-id-4916603.html
Linux install Android development tools Android Studio