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