Unable to start uiautomatorviewer

2019-04-20 04:30发布

I have :

  • Android SDK Tools, Revision 22

  • Android SDK Platform, API 18

I go to <android-sdk>/tools/ , I see there is one file named "uiautomatorviewer",

I execute command uiautomatorviewer from terminal under the above path, however I got the following message:

uiautomatorviewer: command not found

why?

4条回答
时光不老,我们不散
2楼-- · 2019-04-20 04:45

Because your tools/ directory is not in your PATH. Either use ./uiautomatorviewer or add tools/ (and probably platform-tools/ to your PATH. Note that this has nothing to do with programming and everything to do with your *nix-style OS (Linux, OS X, etc.).

查看更多
在下西门庆
3楼-- · 2019-04-20 04:50

Just follow these steps,

Open command prompt,Go to your bin folder inside tools folder of sdk location.

Example: C:\android-sdk\android-sdk\tools\bin.

Then in cmd type uiautomatorviewer and hit enter. It would immedialy open UI Automator Viewer.

C:\android-sdk\android-sdk\tools\bin>uiautomatorviewer

Refer screenshot

enter image description here

查看更多
小情绪 Triste *
4楼-- · 2019-04-20 04:52

Please note that uiautomatorviewer executable has been moved in SDK Tools Revision 25.3.0 (Feb 2017) update to new location under <android-sdk>\tools\bin

查看更多
虎瘦雄心在
5楼-- · 2019-04-20 04:59

Navigate to tools folder, then launch terminal, launch monitor(Android Device Monitor) using ./monitor command.

ADM will get launched, left side of the window you may find uiautomatorviewer.

查看更多
登录 后发表回答