Ubuntu 16.04 搭建Android开发环境

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-ubuntu

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

4、Ubuntu 14.04 安装genymotion

转载于:https://www.cnblogs.com/droi/p/5399975.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/418647.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

前端学习(1879)vue之电商管理系统电商系统之通过axios拦截器添加token认证

目录结构 router.js import Vue from vue import Router from vue-router import Login from ./components/Login.vue import Home from ./components/Home.vueVue.use(Router)const router new Router({routes:[{path:/,redirect:/login},{path:/login,component:Login},{pat…

activiti5.22 springboot 流程引擎 实战全过程

https://blog.csdn.net/ssyujay/article/details/83896809

前端学习(1880)vue之电商管理系统电商系统之获取左侧菜单数据

目录结构 router.js import Vue from vue import Router from vue-router import Login from ./components/Login.vue import Home from ./components/Home.vueVue.use(Router)const router new Router({routes:[{path:/,redirect:/login},{path:/login,component:Login},{pat…

OpenGL学习之路(二)

1 引子 在上一篇读书笔记中&#xff0c;我们对书本中给出的例子进行详细的分析。首先是搭出一个框架&#xff1b;然后填充初始化函数&#xff0c;在初始化函数中向OpenGL提供顶点信息&#xff08;缓冲区对象&#xff09;和顶点属性信息&#xff08;顶点数组对象&#xff09;&a…

eclipse安装lombok

https://blog.csdn.net/Dorothy1224/article/details/79280591 https://blog.csdn.net/z_z_h_0/article/details/85119163

前端学习(1881)vue之电商管理系统电商系统之双层for循环渲染数据

目录结构 router.js import Vue from vue import Router from vue-router import Login from ./components/Login.vue import Home from ./components/Home.vueVue.use(Router)const router new Router({routes:[{path:/,redirect:/login},{path:/login,component:Login},{pat…

iOS之本地推送通知使用介绍

推送通知作用&#xff1a;可以让不在前台运行的app,告知用户app内部发生了什么事情 如何发送本地通知&#xff1a; 发送本地通知步骤&#xff1a; 1.创建本地通知对象 2.设置本地通知内容 3.调度本地通知 具体实现代码&#xff1a; 注意&#xff1a;iOS7通过上述代码可以完成发…

Swagger2 @ApiImplicitParam中dataType和paramType的区别?

https://blog.csdn.net/it_erge/article/details/91492997

前端学习(1882)vue之电商管理系统电商系统之设置字体颜色并添加标签

目录结构 router.js import Vue from vue import Router from vue-router import Login from ./components/Login.vue import Home from ./components/Home.vueVue.use(Router)const router new Router({routes:[{path:/,redirect:/login},{path:/login,component:Login},{pat…

前端学习(1883)vue之电商管理系统电商系统之每次只能打开一个菜单项并解决边框问题

目录结构 router.js import Vue from vue import Router from vue-router import Login from ./components/Login.vue import Home from ./components/Home.vueVue.use(Router)const router new Router({routes:[{path:/,redirect:/login},{path:/login,component:Login},{pat…

第一次冲刺阶段(三)

今天下午我们团队进行了第三次站立会议&#xff0c;总结了昨天的进展状况&#xff0c;的的确确出现很多问题&#xff0c;进展微乎其微&#xff0c;我们对安卓开发知识不熟悉&#xff0c;导致我们举步维艰&#xff0c;很考验耐性与团队的协作能力&#xff0c;我们必须坚持下去&a…

前后端分离之JWT用户认证

https://www.cnblogs.com/wenqiangit/p/9592132.html

前端学习(1884)vue之电商管理系统电商系统之实现侧边栏的折叠和展开

目录结构 router.js import Vue from vue import Router from vue-router import Login from ./components/Login.vue import Home from ./components/Home.vueVue.use(Router)const router new Router({routes:[{path:/,redirect:/login},{path:/login,component:Login},{pat…

前端学习(1885)vue之电商管理系统电商系统之首页路由的重定向

目录结构 router.js import Vue from vue import Router from vue-router import Login from ./components/Login.vue import Home from ./components/Home.vue import Welcome from ./components/Welcome.vue Vue.use(Router)const router new Router({routes: [{path: /,re…

前端学习(1886)vue之电商管理系统电商系统之首页路由的重定向主页侧边栏路由链接的改造

目录结构 router.js import Vue from vue import Router from vue-router import Login from ./components/Login.vue import Home from ./components/Home.vue import Welcome from ./components/Welcome.vue Vue.use(Router)const router new Router({routes: [{path: /,re…

Android adb logcat使用技巧

前言 新买的笔记本E431装了最新版的Eclipse&#xff0c;搞定了Android开发环境&#xff0c;可是logcat里查看东西居然仅仅显示level&#xff0c;没有错误的具体信息。我本身也不是一个愿意折腾图形界面&#xff0c;更喜欢纯命令行的操作&#xff0c;因此今天在明昊师兄的建议下…

artTemplate 简介语法模板

https://www.cnblogs.com/susan-home/p/8548579.html

前端学习(1887)vue之电商管理系统电商系统之通过路由的形式显示用户列表

目录结构 router.js import Vue from vue import Router from vue-router import Login from ./components/Login.vue import Home from ./components/Home.vue import Welcome from ./components/Welcome.vue Vue.use(Router)const router new Router({routes: [{path: /,re…