Ps: The network speed is slow and takes more than a day. It is really hard to set up the app first. After all, there are not many people using the as on Ubuntu. You 'd better bring your own ladder first in many steps. Test environment: the installation of Ubuntu14.04LTS64bit is nothing more than the Androidstudio, SDK, JDK, genymotion, as plug-in. The most painful process is scientific Internet access, but everything went well. The work environment of the project was successfully migrated to Ubuntu. The following items can be viewed in order. It is best to finish reading and then start the entire process.
Ps: The network speed is slow and takes more than a day. It is really hard to set up the app first. After all, there are not many people using the as on Ubuntu. You 'd better bring your own ladder first in many steps.
Test environment:
Ubuntu 14.04 LTS 64bit
The installation is nothing more than the Android studio, SDK, JDK, genymotion, and as plug-ins. The most painful process is scientific Internet access, but everything went well. The work environment of the project was successfully migrated to Ubuntu. The following items can be viewed in order. It is best to finish the items after reading them. If you don't look at them, you just need to look at them.
The first thing we need is JDK.
The default java used in ubuntu is openjdk, jre, and so on. We don't need to use it. We 'd better not touch it. It is better not to use apt-get install for installation.
Download the necessary JDK at the following URL (JDK words are usually prominent ):
http://www.Oracle.com/technetwork/java/javase/downloads/index.html
The full name is generallyJava SE Development Kit 8uxx
For exampleJava SE Development Kit 8u73
Its download link ishttp://download.oracle.com/otn-pub/java/jdk/8u73-b02/jdk-8u73-linux-x64.tar.gz
.
Decompress the downloaded package:
Tar zxvf file name .tar.gz
First, change the appropriate name (shorter) for the folder to a proper location (shorter prefix), and then add the following three lines of commands/etc/profile
Medium:
Export JAVA_HOME = Your JDK location export PATH = $ JAVA_HOME/bin: $ JAVA_HOME/jre/bin: $ PATH export CLASSPATH = $ CLASSPATH :.: $ JAVA_HOME/lib: $ JAVA_HOME/jre/lib
Of course, these three lines of commands have already taken effect for all users. You can change them to the current user in other ways. However, you can leave it alone.
Update our changes to make them take effect:
source /etc/profile
In the last step, configure the following java environment to allow the system to use our JDK instead of the default openjdk. Note: Replace the folder path in the following command:
$ Sudo update-alternatives -- install/usr/bin/java/JDK path/bin/java 300 $ sudo update-alternatives -- install/usr/bin/javac/JDK path/bin/javac 300 $ sudo update-alternatives -- config java $ sudo update-alternatives -- config javac
Confirm that the installation is complete:
java -version
The version information is complete.
Second, SDK
Download the appropriate SDK from the following website:
http://tools.android-studio.org/
Decompress the downloaded package and go to the decompressed folder tools. The android SDK is used to run the package. Download the necessary platform and start studio. If there is a problem with the download process (Wall), go to the following website for details:
https://github.com/inferjay/AndroidDevTools#sdk-tools
Open the SDK and download a few suitable platforms first. We need scientific Internet access, but I don't need them. The speed is also K.
You can install android studio in either of the following ways:
Installing android studio is simple. You only need the following three commands, but it is the official version of android 1.5:
sudo apt-add-repository ppa:paolorotolo/android-studiosudo apt-get updatesudo apt-get install android-studio
Method 2
Method 1: I don't like the old official version of the IDE installed. I want to use the 2.0 preview version. The following links provide multiple download methods. Select your preferred download method.
http://tools.android-studio.org/
After the download is complete, decompress the package. No installation is required. If JDK is correct, switch to the decompressed/bin directory and Press:
./studio.sh
Android studio is started, and some configuration can be done at this time, in the configure area in the lower right corner.
For more information, see the FAQ on the link:
https://github.com/PaoloRotolo/android-studio#faq
Genymotion Simulator
Note that this simulator depends on virtual box. My virtual box is downloaded directly from the center of gravity of the ubuntu software. You can search for it.
The simulator is relatively simple. Download the program from the official website (registration required ):
https://www.genymotion.com/pricing-and-licensing/
After the download is complete, it is just a file named genymotion-2.6.0-linux_x64.bin, you have to give it the permission to execute, and then run it with root:
sudo ./genymotion-2.6.0-linux_x64.bin
This process is automatic throughout the process.
Then there is a runable genymotion in/opt/genymobile/genymotion/, and running it is the simulator.
Success
I encountered the following problems:
- After the project is created for the first time, as always stays on the gradle processing interface related to dependency.
Solution: if it cannot be connected to the Internet, it will not always be processed. Because I have set the gradle http and https proxy, it is like downloading something, but it is very slow, and will fail for a long time. Undo it first, stop it first, and then remove the proxy information. The information will be removed from the following lines in the local. properties file of the project. And then it's done in a miraculous way.
- Unknown generic error is always prompted when genymotion logs on.
Solution: If genymotion is enabled, the virtualbox Nic is displayed, leading to network disconnection. In a suitable wifi environment, set the proxy in it and log on again.
Apt-get failure
Any installation failure may cause the dpkg tool to be unavailable, and the problem of xxx dependency cannot be solved. Provides the following solutions:
Cd/var/lib/dpkg/info/ls | grep "your software name" # Check which rm-rf/var/lib/dpkg/info/software names must be deleted * # delete a File Based on the software name, do not delete sudo dpkg -- remove -- force-remove-reinstreq
<准确软件名>
If you are still confused, simply zoom in and clear these items:
Sudo mv/var/lib/dpkg/info. bak # This is the backup sudo mkdir/var/lib/dpkg/info // and then create an empty
For more information about Android Studio, see the following links.:
Install Android Studio http://www.linuxidc.com/Linux/2015-06/119318.htm in Ubuntu 15.04
Simulator in Android Studio 2.0 has increased speed by 50 times http://www.linuxidc.com/Linux/2015-11/125481.htm
Ubuntu 12.04 (64-bit) Installation of Android Studio full process http://www.linuxidc.com/Linux/2013-05/84812.htm
Android Studio v0.1 early adopters http://www.linuxidc.com/Linux/2013-05/84681.htm
Android Studio use tutorial http://www.linuxidc.com/Linux/2013-05/84579.htm
Android Studio Development Guide http://www.linuxidc.com/Linux/2013-05/84543.htm
Android Studio sets theme and does not support Chinese problem solution http://www.linuxidc.com/Linux/2013-05/84488.htm
Android Studio download and install and cannot open solution http://www.linuxidc.com/Linux/2013-05/84409.htm
Android Studio installation with graphic tutorial http://www.linuxidc.com/Linux/2014-09/106914.htm
Install Android Studio 1.3 on Ubuntu (Google Android IDE development) http://www.linuxidc.com/Linux/2015-08/121004.htm
Android Studio: Click here
Android Studio: Click here
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2
This article permanently updates the link address: Http://www.linuxidc.com/Linux/2016-03/129051.htm