解决adb not responding if youd like to retry...错误

转载请标明出处:http://blog.csdn.net/xx326664162/article/details/50259623 文章出自:薛瑄的博客

你也可以查看我的其他同类文章,也会让你有一定的收货!

错误信息:

第一种

adb not responding if youd like to retry

执行“解决方法”中的3-5步可,可能需要重启Android Studio

第二种:

Unable to create Debug Bridge: Unable to start adb server: ADB server didn’t ACK * failed to start daemon * ‘d:\Android\sdk\platform-tools\adb.exe,start-server’ failed – run manually if necessary

执行“解决方法”中的1-6步可,可能需要重启Android Studio

第三种:

C:\Users\he>adb nodaemon server
error: could not install smartsocket listener: cannot bind to 127.0.0.1:5037:
通常每个套接字地址(协议/网络地址/端口)只允许使用一次。 (10048)

执行“解决方法”中的中的3-5步

解决办法:

1、Go to platform-tools in Android SDK directory.

2、 Type:

adb nodaemon server

Output:

cannot bind 'tcp:5037'

3、Now I know the reason adb not responsive is because it can not bind to port 5037. Use following command to find out the process that occupies the port:

netstat -ano | findstr 5037

Output:

这里写图片描述

4、Note that process with PID 4888 is occupying port 5037.

5、Open Task Manager, click on Details tab, find the process and kill it, tfadb.exe in this case. it may vary for me it is sh.exe and port 4599 and delete all adb.exe

这里写图片描述

6、Retry adb kill-server and adb start-server, hopefully adb is up running fine.

这里写图片描述

参考:http://stackoverflow.com/questions/15136252/android-adb-didnt-ack-issue-in-eclipse
http://blog.csdn.net/macandroid/article/details/45847413

http://blog.csdn.net/xiang_freedom/article/details/51330598

关注我的公众号,轻松了解和学习更多技术
这里写图片描述

展开阅读全文

在APK中通过adb shell命令启动UIautomator失败

06-01
源码如下: protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.fragment_main); Button stButton = (Button)findViewById(R.id.start_test); stButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub try { Process pro = Runtime .getRuntime() .exec("uiautomator runtest TestHiDP.jar -c com.huawei.cases.TestAllCase"); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } }); } 报错信息为: 12-03 08:17:24.452: E/UiAutomatorTestRunner(6046): java.lang.RuntimeException: Didn't find class "com.huawei.cases.TestAllCase" on path: DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/system/framework/uiautomator.jar", zip file "/data/local/tmp/TestHiDP.jar"],nativeLibraryDirectories=[/vendor/lib, /system/lib]] 12-03 08:17:24.452: E/UiAutomatorTestRunner(6046): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.huawei.cases.TestAllCase" on path: DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/system/framework/uiautomator.jar", zip file "/data/local/tmp/TestHiDP.jar"],nativeLibraryDirectories=[/vendor/lib, /system/lib]] 我在pc端输入“adb shell uiautomator runtest TestHiDP.jar -c com.huawei.cases.TestAllCase”是可以正常启动的。 手机端的APK有android:sharedUserId="android.uid.system",使用的是系统签名。在android 4.0的高通平台手机上可以运行,在MTK某些平台的手机上运行不了。在android 5.0上就都运行不了了。请大神帮忙看看 是不是权限,还是什么问题?
©️2020 CSDN 皮肤主题: 撸撸猫 设计师: 设计师小姐姐 返回首页
实付0元
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值