首页 技术 正文
技术 2022年11月11日
0 收藏 603 点赞 3,063 浏览 1425 个字

1.下载eclipse

2.下载sdk

3.安装adt

4.配置sdk环境路径sudo gedit /etc/profile

export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:/home/liufei/program/java/sdk/tools:/home/liufei/program/java/sdk/platforms:$PATH

5.这时候会报一个类似Cannot run program “/sdk/build-tools/android-4.2.2/aapt: error=2的错误

由于我的ubuntu系统是64位的,而aapt工具需要32位库支持才能运行

因此执行:sudo apt-get install ia32-libs   安装32位库

6.连接真机测试(下面参考方法:http://my.oschina.net/u/561492/blog/89954)

解决方法:

切换到android sdk的platform-tools目录下(这一步很重要,必须要sudo,否则没效果)

sudo ./adb devices (这个主要是查看下已连接上的android机器)

List of devices attached

???????????? no permission(这个是小米手机,尚未识别)

semulator-5554 device(~。~我开了个android模拟器)

以下命令是:重启adb服务,再输入adb devices就应该能找到设备了。

sudo ./adb kill-server

sudo ./adb devices

(注意:这两个命令要连起来,即不要等第一条命令执行一段时间后在执行第二条命令,这样就没效果了。在第一条命令执行时,Eclipse的控制台会输出如下信息:

[2013-03-14 10:53:40 – DeviceMonitor] Connection attempts: 1
[2013-03-14 10:53:41 – DeviceMonitor] Connection attempts: 2
[2013-03-14 10:53:42 – DeviceMonitor] Connection attempts: 3
[2013-03-14 10:53:43 – DeviceMonitor] Connection attempts: 4
[2013-03-14 10:53:44 – DeviceMonitor] Connection attempts: 5
[2013-03-14 10:53:45 – DeviceMonitor] Connection attempts: 6
[2013-03-14 10:53:46 – DeviceMonitor] Connection attempts: 7
[2013-03-14 10:53:47 – DeviceMonitor] Connection attempts: 8
[2013-03-14 10:53:48 – DeviceMonitor] Connection attempts: 9
[2013-03-14 10:53:49 – DeviceMonitor] Connection attempts: 10
[2013-03-14 10:53:50 – DeviceMonitor] Connection attempts: 11

一定要注意,必须要在控制台输出完这些信息之前执行第二条命令:sudo ./adb start-server

7.最后本来想上一张图,可是刚接触ubuntn,说实话不会姐图,打字也不方便。

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,026
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,517
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,364
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,145
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,779
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,856