Reputation: 575
I used the uiautomatorviewer to do UI android automation. But when i try to take snapshot to list the UI, it shows adb is not installed.
Upvotes: 7
Views: 10587
Reputation: 51
Edit files last line with below path:
call %java_exe% -Djava.ext.dirs=%javaextdirs% -Dcom.android.uiautomator.bindir=H:\android-sdk\tools -jar %jarpath% %
Upvotes: 3
Reputation: 33
I followed the link: https://plus.google.com/u/0/108487870030743970488/posts/2TrMqs1ZGQv and editted the last line of uiautomatorviewer.bat file but the issue still persisted.
In my case I removed the existing android SDK and reinstalled it via Android Studio and it worked. The new Android SDK does not have a UI for SDK manager and hence its is a hassle to figure out which packages are needed to be installed.
Once the Android Studio is installed it automatically installs the Android SDK and all the required packages for the uiautomatorviewer to work perfectly.
Upvotes: 0
Reputation: 11
Try modifying the .bat file and it works, but it is important that the tools path is with the "\" character closing, but will not work, example call "%java_exe%" "-Djava.ext.dirs=%javaextdirs%" "-Dcom.android.uiautomator.bindir="C:\Android_SDK\tools\" -jar %jarpath% %*
Upvotes: 1
Reputation: 156
See the answer at https://plus.google.com/u/0/108487870030743970488/posts/2TrMqs1ZGQv
Basically, the com.android.uiautomator.bindir
property is not set in uiautomatorviewer.bat
.
Edit the file and set the property to the path for android-sdk/tools folder.
Upvotes: 14