Error: Could not find or load main class com.android.uiautomator.UiAutomatorViewer

自古美人都是妖i 提交于 2019-12-13 17:13:27

问题


I am trying to run Android's UiAutomatorViewer on ubuntu system but when i run this command uiautomatorviewer it gives this error: Error: Could not find or load main class com.android.uiautomator.UiAutomatorViewer I have set path to .bashrc file:

export ANDROID_HOME=/home/rahulsharma/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

When i run other program of tools folder like sdk manager, that executes successfully. Does anyone know where i am doing mistake?


回答1:


Could not find the reason that why i am getting this error but found solution. To start UiAutomatorViewer:

  • Open terminal
  • In terminal go to tools folder inside android sdk
  • run ./uiautomatorviwer command.

Ui Automator Viwer is running now. May be helpful for someone.




回答2:


In my case, the uiautomatorviewer is located inside <android-sdk>/tools/bin

  1. Open terminal, go to <android-sdk>/tools/bin
  2. run ./uiautomatorviewer

Hope this will be helpful.



来源:https://stackoverflow.com/questions/40718487/error-could-not-find-or-load-main-class-com-android-uiautomator-uiautomatorview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!