ubuntu12.04 Android Studio installationCategory: Android 2014-02-17 15:57 10756 People read comments (0) favorite reports
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
Extract:$ 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, hint command not present, what's going on? Well, that's not the way to hit it, is it?
Run again: $ sudo./studio.sh
OK, open.
----------------------------------------Gorgeous split---------------------------------------------------
3, Try a new test project.
After the first new project you will be prompted to download Gradle, which is part of Android studio that takes a long time to wait. 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.
As a construction team workers, tossing a half-day, finally took care of this high-tech gadgets, I too admire myself, to the mirror to burn a fragrance. Well.
The above is for reference only, insufficient, please the teacher pointing.
- Previous one-on-demand live Open source project: P2pcenter
- Next Ubuntu-locate and find: Two commands to find a file
- http://blog.csdn.net/vblittleboy/article/details/19339311
- Http://blog.chinaunix.net/uid-20680966-id-4916603.html
ubuntu12.04 Android Studio installation