'ADB server didn't ACK'的解决办法 , Binary XML file line #...: Error inflating class ...。

log
1、'ADB server didn't ACK'的解决办法 
我自己的做法,就是--进程里关掉“wandoujiaXXXX”---启动命令cmd+(adb kill-server)----重启eclipse。 搞定.


(下面的都是看的别人的解决办法。可以不看。)


网上搜了很多种,但是对我来说都不管用。引起这个错误的原因是有很多方面的。


1.软件冲突。


首先是豌豆荚,尝试关闭豌豆荚,重启eclipse后尝试run as android application....


2.进程里


关闭adb.exe,重启eclipse


3.软件更新


android-sdk的更新


 


有个老外总结的比较全面:


Try below steps:


1.Close the Eclipse if running
2.Go to the Android SDK tools directory in Command Prompt
3.type adb kill-server
4.then type adb start-server
5.No error message is thrown while starting ADB server, then adb is started successfully.
6.Now you can start Eclipse again.
it worked for me this way, Eclipse should be closed before issuing these commands.


前提是你的adb已经配置好了。 如果这时候依然didn't ACK,那么启动任务管理器,看看是否有adb.exe.有的话关掉,再重复以上动作就可以了。


还有一个比较容易忽视的很重要的问题,就是打开taskmanager的时候,并没有adb.exe,如果这时候你认为绝对不是adb的问题你就错了。cmd打开dos,输入adb kill-server,这个时候才能真正保证kill掉了adb.exe。切记切记!




[2014-01-14 11:06:56 - DeviceMonitor] Adb connection Error:远程主机强迫关闭了一个现有的连接。
[2014-01-14 11:06:58 - DeviceMonitor] Connection attempts: 1
[2014-01-14 11:07:00 - DeviceMonitor] Connection attempts: 2
[2014-01-14 11:07:02 - DeviceMonitor] Connection attempts: 3
[2014-01-14 11:07:04 - DeviceMonitor] Connection attempts: 4
[2014-01-14 11:07:06 - DeviceMonitor] Connection attempts: 5
[2014-01-14 11:07:08 - DeviceMonitor] Connection attempts: 6
[2014-01-14 11:07:09 - DeviceMonitor] Connection attempts: 7
[2014-01-14 11:07:11 - DeviceMonitor] Connection attempts: 8
[2014-01-14 11:07:13 - DeviceMonitor] Connection attempts: 9
[2014-01-14 11:07:15 - DeviceMonitor] Connection attempts: 10
[2014-01-14 11:07:17 - DeviceMonitor] Connection attempts: 11
[2014-01-14 11:07:19 - adb] ADB server didn't ACK
[2014-01-14 11:07:19 - adb] * failed to start daemon *
[2014-01-14 11:07:19 - DeviceMonitor] adb restart attempts: 1
[2014-01-14 11:07:21 - DeviceMonitor] Connection attempts: 12
[2014-01-14 11:07:22 - adb] ADB server didn't ACK
[2014-01-14 11:07:22 - adb] * failed to start daemon *
[2014-01-14 11:07:22 - DeviceMonitor] adb restart attempts: 2
[2014-01-14 11:07:24 - DeviceMonitor] Connection attempts: 13
[2014-01-14 11:07:25 - adb] ADB server didn't ACK
[2014-01-14 11:07:25 - adb] * failed to start daemon *
[2014-01-14 11:07:26 - DeviceMonitor] adb restart attempts: 3
[2014-01-14 11:07:28 - DeviceMonitor] Connection attempts: 14
[2014-01-14 11:07:29 - adb] ADB server didn't ACK
[2014-01-14 11:07:29 - adb] * failed to start daemon *
[2014-01-14 11:07:29 - DeviceMonitor] adb restart attempts: 4
[2014-01-14 11:07:31 - DeviceMonitor] Connection attempts: 15
[2014-01-14 11:24:42 - DeviceMonitor] adb restart attempts: 5
[2014-01-14 11:24:44 - DeviceMonitor] Connection attempts: 16
[2014-01-14 11:25:01 - DeviceMonitor] Adb connection Error:远程主机强迫关闭了一个现有的连接。
[2014-01-14 11:25:03 - DeviceMonitor] Connection attempts: 1
[2014-01-14 11:25:05 - DeviceMonitor] Connection attempts: 2
[2014-01-14 11:25:06 - DeviceMonitor] Connection attempts: 3
[2014-01-14 11:25:08 - DeviceMonitor] Connection attempts: 4
[2014-01-14 11:25:10 - DeviceMonitor] Connection attempts: 5
[2014-01-14 11:25:12 - DeviceMonitor] Connection attempts: 6
[2014-01-14 11:25:14 - DeviceMonitor] Connection attempts: 7
[2014-01-14 11:25:16 - DeviceMonitor] Connection attempts: 8
[2014-01-14 11:25:18 - DeviceMonitor] Connection attempts: 9
[2014-01-14 11:25:20 - DeviceMonitor] Connection attempts: 10
[2014-01-14 11:25:22 - DeviceMonitor] Connection attempts: 11
[2014-01-14 11:25:38 - DeviceMonitor] Adb connection Error:远程主机强迫关闭了一个现有的连接。
[2014-01-14 11:25:39 - DeviceMonitor] Connection attempts: 1
[2014-01-14 11:25:41 - DeviceMonitor] Connection attempts: 2
[2014-01-14 11:25:43 - DeviceMonitor] Connection attempts: 3
[2014-01-14 11:25:45 - DeviceMonitor] Connection attempts: 4


ctrl+alt+delete 关闭adb.exe  ,关闭豌豆荚,手机助手等,有时候需要重新启动eclipse


3、android.view.InflateException: Binary XML file line #...: Error inflating class ...。


可能由于资源文件找不到xml,可能是引用了不存在的资源,可能是标签中所引用的类不在同一包下。
例如"@drawable/..."所引用的图片不存在;
或者
<com.yourpackege.yourLayout
          android:id="@+id/name"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:background="@color/transparent"/>
中yourLayout这个类不在com.yourpackege中;
 
等等。


Android.View.InflateException: Binary XML File Line #异常的解决


可能两种原因引起:


原因一:
   必须实现三个构造函数:
    public GalleryFlow(Context context) {
            super(context);
    }


    public GalleryFlow(Context context, AttributeSet attrs) {
            super(context, attrs);
    }


    public GalleryFlow(Context context, AttributeSet attrs, int defStyle) {
            super(context, attrs, defStyle);
    }
原因二:
   或者XML中包错!
   <com.yourpackege.yourLayout
          android:id="@+id/name"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:background="@color/transparent"/>
   中yourLayout这个类不在com.yourpackege中。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值