When running uiautomatorviewer
, I am getting the following NullPointerException
error:
I have installed and set up Appium following the setup process and set up environment variables for ANDROID_HOME and the Android SDK. The uiautomatorviewer
command is using a Path user variable that points to the directory Sdk/tools/bin
, where the uiautomatorviewer.bat
file is located. From everything I've read online, running this executable should open up the UiAutomatorViewer application, so I can inspect elements on my Android app. Why isn't this working?
Java SDKs 9 and 10 do not work with Appium and the Android SDK. You have to uninstall the Java SDK for the more recent version and install the Java 8 SDK instead.
Follow this process:
brew cask uninstall java # uninstall java9
brew tap caskroom/versions
brew cask install java8 # install java8
touch ~/.android/repositories.cfg # without this file, error will occur on next step
brew cask install android-sdk