Trying to get the android UI Testing that comes as part of ADT21 (http://developer.android.com/tools/testing/testing_ui.html) to work currently and I seem to be running into some issues.
After creating a test we have to set it up as a uitest-project, the web page tells us the command is:
<android-sdk>/tools/android uitest-project -n <name> -t 1 -p <path>
But this appears to be incorrect and it should be:
<android-sdk>/tools/android create uitest-project -n <name> -t 1 -p <path>
But on running this I get the error:
Error: UI test projects can only target API 16 and above
Which i assume related to the -t parameter, i have then since tried all the values from 1 to 18 (a version of android that doesn’t even exist yet) and it gives me the same error. Anyone figured it out? I assume it is going to be something simple.
The answer was really simple. Examples shows you 1, what the -t actually wants is a target but the id is dependant on the results of running the command:
This command will give you a list of targets you can use with IDs dependant on what you have installed on your system.
For example on my system i got:
So i use the command