2016-11-21 178 views
0

我試圖在Ubuntu系統上運行Android的UiAutomatorViewer但是當我運行此命令uiautomatorviewer它給出了這樣的錯誤:Error: Could not find or load main class com.android.uiautomator.UiAutomatorViewer我已設置路徑.bashrc文件:錯誤:無法找到或加載主類com.android.uiautomator.UiAutomatorViewer

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

當我運行其他程序工具文件夾像sdk管理器,執行成功。 有誰知道我在做什麼錯誤?

enter image description here

回答

1

找不到那爲什麼我收到此錯誤,但找到解決方案的原因。要啓動UiAutomatorViewer:

  • 打開終端
  • 在終端去工具文件夾Android SDK中
  • 運行./uiautomatorviwer命令裏面。

Ui Automator Viwer現在正在運行。 對某人有用。

1

在我的情況下,uiautomatorviewer位於內<android-sdk>/tools/bin

  1. 打開終端,去<android-sdk>/tools/bin
  2. 運行./uiautomatorviewer

希望這會有所幫助。