Ubuntu 14.04 Android 环境搭建错误解决(adb)
2014-04-24 19:36
483 查看
在一个全新的ubuntu14.04系统搭建android开发环境,下载jdk,sdk什么的就不啰说了。
问题一:
在打开sdk里自带的eclipse时,马上报
adb: error while loading shared libraries: libstdc++.so.6: wrong ELF class: ELFCLASS64
执行 sudo apt-get install ia32-libs ###无效,不要没看完就复制
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
现在没有可用的软件包 ia32-libs,但是它被其它的软件包引用了。
这可能意味着这个缺失的软件包可能已被废弃,
或者只能在其他发布源中找到
可是下列软件包取代了它:
lib32z1 lib32ncurses5 lib32bz2-1.0
E: 软件包 ia32-libs 没有可供安装的候选者
解决方法:sudo apt-get install lib32ncurses5 lib32stdc++6
问题二:usb调试时,手机无法识别
$ adb devices
List of devices attached
???????????? no permissions
解决方法:
1)断开手机连接先执行eeeeee@tsc:~$ lsusb
Bus 002 Device 002: ID 8087:8000 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 006: ID 0cf3:3004 Atheros Communications, Inc.
Bus 003 Device 003: ID 040b:2013 Weltrend Semiconductor
Bus 003 Device 002: ID 174f:1474 Syntek
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
连接手机,再执行一次lsusb
那多出来的Bus 003 Device 009: ID 18d1:9025 Google Inc. 就是你的手机,我的时小米的。
2、首先使用 vim 新建一个配置文件
[plain] view
plaincopy
$ sudo vim /etc/udev/rules.d/70-android.rules
内容填写如下
[plain] view
plaincopy
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="9025",MODE="0666"
##修改18d1和9025,把他改成你的设备##
3、运行以下命令:
[plain] view
plaincopy
sudo chmod a+rx /etc/udev/rules.d/70-android.rules
sudo /etc/init.d/udev restart
4、在 Android sdk 的 tools 目录下运行 (这一步很重要,必须要sudo,否则没效果)
[plain] view
plaincopy
sudo ./adb kill-server
5、修改完成后,将手机USB线与电脑断开,再连就会显示OK !
[plain] view
plaincopy
$ adb devices
List of devices attached
1234567890ABCDEF device
问题一:
在打开sdk里自带的eclipse时,马上报
adb: error while loading shared libraries: libstdc++.so.6: wrong ELF class: ELFCLASS64
执行 sudo apt-get install ia32-libs ###无效,不要没看完就复制
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
现在没有可用的软件包 ia32-libs,但是它被其它的软件包引用了。
这可能意味着这个缺失的软件包可能已被废弃,
或者只能在其他发布源中找到
可是下列软件包取代了它:
lib32z1 lib32ncurses5 lib32bz2-1.0
E: 软件包 ia32-libs 没有可供安装的候选者
解决方法:sudo apt-get install lib32ncurses5 lib32stdc++6
问题二:usb调试时,手机无法识别
$ adb devices
List of devices attached
???????????? no permissions
解决方法:
1)断开手机连接先执行eeeeee@tsc:~$ lsusb
Bus 002 Device 002: ID 8087:8000 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 006: ID 0cf3:3004 Atheros Communications, Inc.
Bus 003 Device 003: ID 040b:2013 Weltrend Semiconductor
Bus 003 Device 002: ID 174f:1474 Syntek
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
连接手机,再执行一次lsusb
Bus 002 Device 002: ID 8087:8000 Intel Corp. Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 8087:8008 Intel Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 006: ID 0cf3:3004 Atheros Communications, Inc. Bus 003 Device 009: ID 18d1:9025 Google Inc. Bus 003 Device 003: ID 040b:2013 Weltrend Semiconductor Bus 003 Device 002: ID 174f:1474 Syntek Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
那多出来的Bus 003 Device 009: ID 18d1:9025 Google Inc. 就是你的手机,我的时小米的。
2、首先使用 vim 新建一个配置文件
[plain] view
plaincopy
$ sudo vim /etc/udev/rules.d/70-android.rules
内容填写如下
[plain] view
plaincopy
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="9025",MODE="0666"
##修改18d1和9025,把他改成你的设备##
3、运行以下命令:
[plain] view
plaincopy
sudo chmod a+rx /etc/udev/rules.d/70-android.rules
sudo /etc/init.d/udev restart
4、在 Android sdk 的 tools 目录下运行 (这一步很重要,必须要sudo,否则没效果)
[plain] view
plaincopy
sudo ./adb kill-server
5、修改完成后,将手机USB线与电脑断开,再连就会显示OK !
[plain] view
plaincopy
$ adb devices
List of devices attached
1234567890ABCDEF device
相关文章推荐
- Android --- 64bit Ubuntu 系统下 搭建JDK和SDK环境后,出现adb:error =12错误
- Android --- 64bit Ubuntu系统下 搭建JDK和SDK环境后,出现android-sdk-linux/platform-tools/adb: 没有那个文件或目录错误
- Android --- 64bit Ubuntu 系统下 搭建JDK和SDK环境后,出现adb:error =12错误
- 4412环境搭建:arm-linux-gcc不成功解决办法ubuntu14.04
- 安装64位ubuntu 14.04-搭建android开发环境
- ionic环境搭建遇到启动android错误的解决办法
- ubuntu14.04上搭建android开发环境
- ubuntu 14.04搭建android编译环境
- Android系统编译环境搭建—Ubuntu14.04安装&root登录&Chromium root启动&安装配置交叉编译环境
- Eclipse搭建Android开发环境之ADT安装常见错误及解决方法
- 在Ubuntu 14.04(64bit)上搭建Android编译环境(通用版)
- Ubuntu 14.04 搭建Android开发环境 (转载)
- android搭建环境错误 daemon not running. starting it now on port 5037 ADB server didn't ACK
- 在ubuntu 14.04 编译android 2.3.1 错误解决办法
- ubuntu14.04搭建tomcat+jdk环境教程及其可能出现的错误说明
- [Android] 在Ubuntu 12.04 (64bit)上使用搭建Android的调试环境:ADB USB Connection By root
- Ubuntu 14.04 安装搭建Android开发编译环境
- ubuntu 14.04-64x搭建android环境
- Android 编译环境配置搭建(Ubuntu 14)及环境导致编译错误
- Ubuntu 14.04 搭建MTK Android源码编译环境搭建