user3281879
user3281879

Reputation: 33

Error: Target id is not valid.

getting the error while running the following command:

./android create uitest-project -n DeviceTest -t 31 -p ~/Documents/workspace/DeviceTest/

Upvotes: 1

Views: 4921

Answers (2)

Kasumi Gunasekara
Kasumi Gunasekara

Reputation: 630

In a linux environment, find your 'tools' directory (/Documents/tools). Then within the tools directory, type the following command to retrieve all the available IDs and their details in your Android SDK: android list target

Upvotes: 0

Dnavir
Dnavir

Reputation: 564

You should provide an correct target Id.

To get the List of target ID's

  1. cd to the tools directory in your android sdk.
  2. Execute android list target command

All the available Id's in your android sdk will be listed down. Use any one of the listed target ID.

NOTE: UiAutomator works only on devices supporting API level 16 and above.Therefore, select a target ID which corresponds to "android-16" or above

Upvotes: 3

Related Questions