Ubuntu 16.04 builds Android development environment

Source: Internet
Author: User

1. Installing Java

sudo add-apt-repository ppa:webupd8team/javasudo apt-get updatesudo apt-get install oracle-java8-installer

After that

  sudo apt-get install oracle-java8-set-default

2、Installing Android Studio

(1) Download Android Studio from this or Here,use all Android Studio Packages

(2) Extract the archive file into a appropriate location for your applications, eg:/opt. Use the filename of your Downlo Aded Archive, in my example Android-studio-ide-143.2739321-linux.zip

  sudo unzip android-studio-ide-141.2178183-linux.zip-d/opt

(3) to launch for Android Studio, navigate to The/opt/android-studio/bin directory in a terminal and execute./stu dio.sh. Or use a desktop file, see below.

Can want to add/opt/android-studio/bin to your PATH environmental variable so this you could start Android studio from Any directory.

3. Create a Desktop file

gedit ~/.local/share/applications/android-studio.desktop

and add the lines below

  [Desktop Entry]
version=1.0
Type=application
Name=android Studio
Exec= "/opt/android-studio/bin/studio.sh"%f
Icon=/opt/android-studio/bin/studio.png
Categories=development;ide;
Terminal=false
Startupnotify=true
Startupwmclass=android-studio

4. Installing Android SDK

Use the Android SDK Manager or download from here

5. ADD adb PATH

(1) sudo gedit ~/.bashrc

Add this to the file

  # Android SDK
Export Android_sdk_home=<your SDK path>
Path= $PATH: $ANDROID _sdk_home/tools
Path= $PATH: $ANDROID _sdk_home/platform-tools

and then

  SOURCE ~/.BASHRC  

(2) Cd/usr/bin

  sudo ln-s <your adb path>

(3) adb devices

If you get the like this:

  List of devices attached
0123456789ABCDEFno Permissions

Then you should just try this:

  sudo adb kill-server

and then

  sudo adb start-server

If you still get like this:

  List of devices attached
0123456789ABCDEFunauthorized

Maybe should open USB debug on your phone

参考资料:
1、http://androiddevtools.cn/

2、http://askubuntu.com/questions/634082/how-to-install-android-studio-on-ubuntu

3、http://stackoverflow.com/questions/9210152/set-up-device-for-development-no-permissions

4、Ubuntu 14.04 安装genymotion

Ubuntu 16.04 builds Android development environment

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.