1、Installing Java

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo 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 here or here,use All Android Studio Packages

  (2) Extract the archive file into an appropriate location for your applications, eg: /opt. Use the filename of your downloaded 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 Android Studio, navigate to the /opt/android-studio/bin directory in a terminal and execute ./studio.sh. Or use a desktop file, see below.

You may want to add /opt/android-studio/bin to your PATH environmental variable so that you can 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 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 like this:  

  List of devices attached
  0123456789ABCDEF no 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
  0123456789ABCDEF unauthorized

  maybe you should open USB debug on your phone

参考资料:
1、http://androiddevtools.cn/ 2、http://askubuntu.com/questions/634082/how-to-install-android-studio-on-ubuntu3、http://stackoverflow.com/questions/9210152/set-up-device-for-development-no-permissions4、Ubuntu 14.04 安装genymotion

Ubuntu 16.04 搭建Android开发环境的更多相关文章

  1. Ubuntu 12.04 搭建Android开发环境

    Ubuntu 12.04 搭建Android开发环境 2013/7/29 Linux环境下搭建Android开发环境 大部分开发人员可能都在Windows下做开发,可能是感觉在Windows下比较方便 ...

  2. Ubuntu 16.04搭建LAMP开发环境

    基本设置 1.配置网络环境 管理员给分配了一个静态IP,所以还需要进一步配置网络环境 配置DNS:右上角网络连接->编辑链接->有线连接1->IPv4设置->DNS服务器:20 ...

  3. 【转】64位Ubuntu 16.04搭建嵌入式交叉编译环境arm-linux-gcc过程图解

    64位Ubuntu 16.04搭建嵌入式交叉编译环境arm-linux-gcc过程图解,开发裸机环境之前需要先搭建其开发环境,毕竟工欲善其事必先利其器嘛.  安装步骤 1.准备工具安装目录 下载 ar ...

  4. [eShopOnContainers 学习系列] - 03 - 在远程 Ubuntu 16.04 上配置开发环境

    直接把 md 粘出来了,博客园的富文本编辑器换成 markdown,没啥效果呀 ,先凑合吧.实在不行换地方   # 在远程 Ubuntu 16.04 上配置开发环境 ## 零.因 为什么要用这么麻烦的 ...

  5. Ubuntu 16.04 系统基础开发环境搭建

    1.安装 Git sudo apt-get update sudo apt-get install git Do you want to continue? [Y/n] Y git --version ...

  6. Ubuntu 16.04 搭建LAMP服务器环境流程

    http://www.linuxidc.com/Linux/2016-09/135629.htm [安装mysql时 只需安装 mysql-server无需安装mysql-client] mysql ...

  7. Ubuntu 16.04 以太坊开发环境搭建

    今天我们来一步一步从搭建以太坊智能合约开发环境. Ubuntu16.04 安装ubuntu16.04.下载链接 //先update一下(或者换国内源再update) sudo apt-get upda ...

  8. Ubuntu 14.04 设置Android开发环境

    准备Java环境 本文仅仅安装sdk,不安装什么IDE,由于我仅仅须要命令行模式开发就可以. 首先安装openjdk 1.6.然后安装ant.这个不赘述. 下载SDK 从这里下载SDK for Lin ...

  9. Ubuntu上如何搭建Android开发环境

    1.以下是开始Android应用程序编程之前需要的软件列表: a.Java JDK5 及以后版本 b.Java运行环境 c.Android Studio 2.安装Android Studio: x64 ...

随机推荐

  1. Node填坑教程——整理文件

    如果你能把所有代码写进一个文件,并且能很好的管理.协调.多人开发.那么可以跳过这期(请务必带我飞). 我们接着完善上期的代码,给代码分家. node并没有启动入口,更没有固定的项目结构,文件配置.这些 ...

  2. IP数据报是如何在网络中转发的?

    首先发送方抽取目的站的网络前缀,来判断是否目的站是否位于同一网络上,如果在二者有相同的网络前缀,则,直接使用直接交付的方式, 否则,使用由路由器互连的间接交付,这要借助IP路由表,采用表驱动法,路由表 ...

  3. ScriptCase升级到7.01

    今天打开ScriptCase的开发环境,发现有新的升级,联网自动升级后,发现已经升级到7.01版本. 7.01版本对界面进行了优化,菜单和图标均以立体的形式进行展现. 不过粗粗看了一下,翻译还是有很多 ...

  4. 任务分配book

    上次写某道findpath的时候,没有写个二分答案没有过,之后就发现自己貌似一开始学分治那一块的时候就没有把二分学好....就打算重新回顾一下 这道题还算水,就是太久没有写模拟wa了3次....对自己 ...

  5. copy指定目录下包括子目录中所有的文件

    #include <windows.h> #include <iostream> #include <string> using namespace std; DW ...

  6. SQLSERVER利用FOR XML PATH实现分组拼接字符串

    首先看一下数据结构表 IF(OBJECT_ID('tempdb..#tProduct')IS NOT NULL) DROP TABLE #tProduct SELECT * INTO #tProduc ...

  7. 几行实现圆形头像,以及一些常见需求形状自定义ImageView组件

    在实际开发中,我们经常会遇到这样的需求,就是无论图片长啥样,我们都要其显示成圆形.圆形加一个边框.矩形加边框,带圆角的矩形等等,我已把自己平常用的组件和demo上传到了github(https://g ...

  8. SQL Server中日志

    再谈SQL Server中日志的的作用 简介 之前我已经写了一个关于SQL Server日志的简单系列文章.本篇文章会进一步挖掘日志背后的一些概念,原理以及作用.如果您没有看过我之前的文章,请参阅: ...

  9. 解决phpmailer可以在windows下面发送成功, 在linux下面失败的问题

    谢天谢地...差点因为在linux下面phpmailer发送邮件失败转到了window+IIS... Godaddy的linux服务器无法用phpmailer发送(我用的是网易的邮箱服务器...虽然现 ...

  10. T-SQL查询语句(二):嵌套查询

    一个select...From...Where查询语句块可以嵌套在另一个select...From...Where查询块的Where子句中,称为嵌套查询.外层查询称为父查询,主查询.内层查询称为子查询 ...