Chinaunix首页 | 论坛 | 博客
  • 博客访问: 293345
  • 博文数量: 82
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 874
  • 用 户 组: 普通用户
  • 注册时间: 2015-03-21 09:58
个人简介

traveling in cumputer science!!

文章分类

全部博文(82)

文章存档

2016年(13)

2015年(69)

我的朋友

分类: Android平台

2015-08-30 13:39:57

声明:文章原创,转载需注明出处。由于文章大多是学习过程中的记录内容,技术能力有限,希望大家指出其中错误,共同交流进步。由此原因,文章会不定期改善,看原文最新内容,请到:http://blog.chinaunix.net/uid/29454152.html
1 install jdk-7

use below command in terminal:

点击(此处)折叠或打开

  1. sudo apt-get install openjdk-7-jdk

 when install java complete checkout it by below command:

点击(此处)折叠或打开

  1. java -version

when appear below message indicate the install is sucessful.

点击(此处)折叠或打开

  1. java version "1.7.0_79"
  2. OpenJDK Runtime Environment (IcedTea 2.5.6) (7u79-2.5.6-0ubuntu1.14.04.1)
  3. OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)

2 install android studio
    use below to install android studio automatically:

点击(此处)折叠或打开

  1. sudo apt-add-repository ppa:paolorotolo/android-studio

  2. sudo apt-get update

  3. sudo apt-get install android-studio
3 start a new project by android studio
    1) open the "android studio" at dir /opt/android-studio/bin and use  ./studio.sh to start the "android studio"
    then you may have some problem
    2)when you meet the error :Unable to run mksdcard SDK tool. use below command can resolve:

点击(此处)折叠或打开

  1. sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6
    3)set the SDK in your own path
    like mine :

点击(此处)折叠或打开

  1. /home/warrior/Android/Sdk
    4) when you meet the error :
Throwable: Unable to locate adb within SDK. you can solve it by below method:
    Check your [sdk directory]/platform-tools (my path: /home/warrior/Android/Sdk/platform-tools)directory, if it exists. If not, then open the SDK manager in the Android Studio (a button somewhere in the top menu, android logo with a down arrow in below picture and the selected icon ADM), and download&install the Tools > Android SDK Platform-tools.


then you can start a VM or use your own phone to test your project!!

阅读(1735) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~