Android Studio installation

Source: Internet
Author: User

Address: http://blog.sina.com.cn/s/blog_b15639e00101tor5.html

1, download the JDK, I downloaded is jdk-7u51-linux-i586.tar.gz
I have a JVM folder here, Direct CD Past:
$ cd/usr/lib/jvm/
Copy the downloaded jdk-7u51-linux-i586.tar.gz to the JVM folder:
$ sudo cp ~/download/JDK-7U51-LINUX-I586.TAR.GZ/USR/LIB/JVM
Extract:
$ sudo tar-zxvf jdk-7u51-linux-i586.tar.gz
Set Environment variables:
$ sudo gedit/etc/profile
Append at end of document:
Export java_home=/usr/lib/jvm/jdk1.7.0_51
Export path= $JAVA _home/bin: $JAVA _home/jre/bin: $PATH
Export classpath= $CLASSPATH:.: $JAVA _home/lib: $JAVA _home/jre/lib
Modify the system default Java to:
$ sudo update-alternatives--install/usr/bin/java Java/usr/lib/jvm/jdk1.7.0_51/bin/java 300
$ sudo update-alternatives--install/usr/bin/javac Javac/usr/lib/jvm/jdk1.7.0_51/bin/javac 300
$ sudo update-alternatives--config java
$ sudo update-alternatives--config javac
Check, enter:
$ java-version
Show:
Java Version "1.7.0_51"
Java (TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot (TM) Server VM (build 24.51-b03, Mixed mode)
----------------------------------------Gorgeous split---------------------------------------------------
2. Download Android Studio Package android-studio-bundle-133.970939-linux.tgz
Unzip: $ sudo tar zxvf android-studio-bundle-133.970939-linux.tgz
The folder name is Android-studio after decompression.
Move: $ sudo mv android-studio/opt/
Open folder: $ cd/opt/android-studio/bin/
Run: $ sudo studio.sh
Oh shit, the hint command doesn't exist, what's going on? Well, that's not the way to hit it, is it?
Run again: $ sudo./studio.sh
OK, it's open.
----------------------------------------Gorgeous split---------------------------------------------------
3. Try a new test project.
After the first new project you will be prompted to download the Gradle, which is part of the Android studio that takes a long time and waits slowly. The terminal prompts are as follows:
Downloading Http://services.gradle.org/distributions/gradle-1.9-all.zip
......................................................................................................................... ..............................................................
Two hours? Have a meal, take a shower and get back on, okay.



Then create a new ADK and run the ADK.
Problems encountered:
Waiting for device.
/OPT/ANDROID-STUDIO/SDK/TOOLS/EMULATOR-AVD Avd_for_nexus_s_by_google-netspeed Full-netdelay None
Panic:could not Open:avd_for_nexus_s_by_google
Hint not found, why can't find? The original virtual machine launcher went to the/home/username/.android directory to find the Android virtual machine.
In fact, what if the created Android virtual machine is saved in the/root/.android folder? I'm going to be a liar.
Delete/home/username/.android First:
~$ sudo rm-r. Android
Make a link:
~$ sudo ln-s/root/.android./.android
And then run try, wow, I took my own, unexpectedly see the virtual machine interface ....

After the virtual machine starts, run our test program:

Above, a complete Android studio environment was built and test passed. As for the plug-in what, my amateur player, temporarily do not toss.

Android Studio installation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.