调试问题杂记

时间:2021-11-28 17:07:42

1.Unable to find the layout for Action Bar.

调试问题杂记

切换编辑主题

2.adb server version (31) doesn't match this client (36); killing...
error: could not install *smartsocket* listener: cannot bind to 127.0.0.1:5037:
通常每个套接字地址(协议/网络地址/端口)只允许使用一次。 (10048)

卸载360手机助手

3.Connecting to the target VM, address: 'localhost:8600', transport: 'socket'

in android studio: tools->android->enable adb integration(this should be checked) uncheck this, then check again. this solved me this problem. (it restarts the adb integration)

4.

uiautomatorviewer。第一次使用出现报错:Unable to connect to adb. Check if adb is installed correctly。

解决办法如下:

1、打开uiautomatorviewer.bat,找到uiautomatorviewer.bat文件最后一行:

call "%java_exe%" "-Djava.ext.dirs=%javaextdirs%" "-Dcom.android.uiautomator.bindir=%prog_dir%" -jar %jarpath% %*

2、将  %prog_dir%  修改为SDK的platform-tools所在路径。

3、修改后的最后一行为:

call "%java_exe%" "-Djava.ext.dirs=%javaextdirs%" "-Dcom.android.uiautomator.bindir=D:\AndroidSDK\platform-tools" -jar %jarpath% %*

4、再次启动工具uiautomatorviewer: