I am getting below error while setting up Appium for android on Mac OS X

Error: Target id is not valid. Use 'android list targets' to get the target ids.

Warning: Setup cmd /Users/***/Documents/android-sdk-macosx/tools/android failed with code 1 Use --force to continue.

Aborted due to warnings.

---- FAILURE: reset.sh exited with status 1 ----

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

1 Answer

answered by (171 points)
selected by
0 votes
Best answer
just set your ANDROID_HOME, and add $ANDROID_HOME/tools and $ANDROID_HOME/platform-tools to variable $PATH.

Open Terminal and type android. You will see Android SDK Manager GUI. Select target and install it.

You can come back to terminal and type "android-list-targets". You will see targets there.