解决方法:转自:https://plus.google.com/108487870030743970488/posts/2TrMqs1ZGQv

Challenge Accepted:
1. ScreenshotAction class has this in its run() method when !DebugBridge.isInitialized()

2. DebugBridge is not initialized when it can't find the "platform-tools" folder which it gets via the property ""com.android.uiautomator.bindir"

3. The above property is set (in windows) in uiautomatorviewer.bat:
call %java_exe% Djava.ext.dirs=%javaextdirs% -Dcom.android.uiautomator.bindir= -jar %jarpath% %

4. Strange that it is empty isn't it. Changing the above line in my case to:
call %java_exe% -Djava.ext.dirs=%javaextdirs% -Dcom.android.uiautomator.bindir=H:\android-sdk\tools -jar %jarpath% %

This solves the issue, and UI Automator Viewer is up. The app is pretty neat with all the "mouse over""find view" feature.

 

翻译:

修改uiautomatorviewer.bat文件标红部分

call "%java_exe%" "-Djava.ext.dirs=%javaextdirs%" "-Dcom.android.uiautomator.bindir=C:\Users\z_wh\AppData\Local\Android\sdk\tools" -jar %jarpath% %*

相关文章:

  • 2022-12-23
  • 2021-06-04
  • 2021-08-25
  • 2021-07-20
  • 2021-06-01
  • 2022-02-02
  • 2022-01-12
猜你喜欢
  • 2021-04-21
  • 2022-12-23
  • 2021-07-07
  • 2021-04-30
  • 2021-05-07
  • 2021-07-30
  • 2021-09-07
相关资源
相似解决方案