问题描述
我正在尝试在ubuntu系统上运行Android的UiAutomatorViewer,但是当我运行此命令uiautomatorviewer
时,出现此错误:Error: Could not find or load main class com.android.uiautomator.UiAutomatorViewer
我已将路径设置为.bashrc文件:
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
当我运行工具文件夹的其他程序(如sdk管理器)时,将成功执行.有人知道我在哪里做错吗?
When i run other program of tools folder like sdk manager, that executes successfully.Does anyone know where i am doing mistake?
推荐答案
无法找到我收到此错误的原因,但找到了解决方案.要启动UiAutomatorViewer:
Could not find the reason that why i am getting this error but found solution. To start UiAutomatorViewer:
- 打开终端
- 在终端中,转到android sdk内的tools文件夹
- 运行
./uiautomatorviwer
命令.
- Open terminal
- In terminal go to tools folder inside android sdk
- run
./uiautomatorviwer
command.
Ui Automator Viwer现在正在运行.可能对某人有帮助.
Ui Automator Viwer is running now.May be helpful for someone.
这篇关于错误:找不到或加载主类com.android.uiautomator.UiAutomatorViewer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!