Original: http://forum.android-studio.org/forum.php?mod=viewthread&tid=236&extra=page%3D1%26filter%3Dtypeid% 26typeid%3d9%26typeid%3d9
The following are some ways to install Android Studio under Ubuntu:
A, add A software source Direct apt installation
B. Download the Deb package, plus the JDK installation
C, download JDK, Android-studio, android-sdk-linux self-installation
for the above A, B two methods relatively simple, directly on the http://paolorotolo.github.io/android-studio/, Simple three-step apt step. If you are not successful in installing additional packages, refer to step 11th below.
If the A, b two-step installation is unsuccessful, you can use the C method. The following is a more detailed introduction to the C method.
1, download
The necessary packages for the Linux Ubuntu Manual installation Studio: JDK, Android-studio, android-sdk-linux (if you can turn Qiang, This bag is not necessary.)
can download the current version of the JDK on the Oracle website, the URL is as follows, choose the corresponding 32-bit or 64-bit version of
http://www.oracle.com/technetwork/java/ javase/downloads/index.html
To download Android tools on http://tools.android-studio.org/website
Android-studio-ide
android-sdk_rxx-linux
2, unzip
Use the command line yourself, mount it, unzip it directly, and so on, for example, I extracted three downloaded tools into the/opt directory
/opt/android-studio
/opt/android-sdk-linux
/OPT/JDK1.8.0_25
3, pre-installation script changes
A, change/opt/android-studio/bin/ studio.sh, add the JDK path to the script so that when studio.sh at run time, you will not be prompted to find the JDK path
jdk_ Home= "/opt/jdk1.8.0_25
If you use a VPN or other Qiang means, you can basically do not look at the following, directly installed on the line.
b, change the/opt/android-studio/bin/idea.porperties,
Add on last line
Disable.android.first.run=true
This avoids the "fetching Android SDK component Information" (The great motherland will keep Google out of the way) when the runtime is stuck at the beginning.
4. Operation
Terminal change/opt/android-studio/bin/studio.sh permissions add executable and then run it
, you may be prompted to have a new version of the question whether to upgrade, look at the individual, if you feel that the current version can not upgrade skip to 10 steps, if you want to upgrade, go down
5, upgrade,
Click on the "check" below the interface to update to the XX version, you can click "Updates" to modify what version you want to push.
I choose stable version, and then save, ignore the update, click the "Check" below again, this back to push the stable version is 1.1.0
Click "Update and Restart", wait for the upgrade, update the last step, the problem comes, the following error message appears
The original Android Studio update is similar to version control, will check the original directory changes, because we have just changed the two files, resulting in a version update error, the solution is to restore the original file, but this step is to follow the following steps step by step.
6. Cancel Restart
Note The above error message, then click "Cancel", the software automatically restart;
7. Upgrade again
Click "Check" again to the Update info interface. OK, then do not click "Update and Restart", first the error is handled.
Since we have just modified studio.sh and idea.porperties to cause versioning problems, two methods of processing:
You can either delete the content you just added to restore to the original identical file;
Or we can extract the two files from the original compressed package and restore them back.
(sometimes there may be studio.sh~, idea.porperties~ two file errors, directly delete the two on the line, note ~ The file is hidden)
8. Upgrade
After reverting back to the file, you can click "Update and Restart".
9. Restore manual Configuration
After upgrading the automatic restart, will be stuck in the "fetching Android SDK component Information" interface, this is due to the idea.porperties was restored, terminal CTRL + C end studio.sh, and then execute 3, 42 steps.
Enter the new version of the interface
10, set the default tool path (you can be careful not to set the previous Sdk-manager, is not point)
Open the Configure-->project defaults-->project structure-->sdk location, set the SDK and JKD path, and two paths are the two other tools you just downloaded
/opt/android-sdk-linux
/opt/jdk1.8.0_25
After Setup is complete, the SDK manager in configure will light up, basically a Android studio that doesn't have to be updated, but if we still want to get the online package we have to go down.
11, set up the SDK manager domestic source and domestic agent
At this time open the SDK Managerl interface, may be the interface below may be stuck in the "dl-ssl.google.com" in the status of the data, open tools-->options, set the proxy URL, the URL can be in the previous HTTP/ Found in tools.android-studio.org/.
For example, I chose ubuntu.buct.cn, then fill in the server ubuntu.buct.cn, Port 80, and then tick the next two
Then click Packages-->reload, after the update prompts you to have several packages to install, several packages to delete
Click Install X Packages for installation, select Accept license to install, sometimes you may be prompted some packages 缼 less dependent on
There are two ways to do this: either re-select the corresponding package from the SDK Manager, or click the package to not install it first
Installation time, sometimes prompted may also appear in the Get "dl-ssl.google.com" down the data stuck for a long time, can be modified, in Tools-->manage add-on Sites-->user Defined Sites inside , click New to add a domestic image XML file, here the XML file we can get from the proxy image source,
Add the XML file from all the directories in the source to new, then official add-on sites inside the Disable all, and then update is the list of the sources we added.
The corresponding package can be installed at this time.
If the installation fails at times, click Clear Cache in Tools-->options and then reload, or close SDK Manager to open it.
At this point, the basic installation of Android Studio under Ubuntu is complete.
"Reprint" rookie Ubuntu under install Android Studio