First, create a build file
Android Create Uitest-project-n <jars>-T 1-p <workspace path>
Where-n followed by the name of the jar to be released,-T followed by the version of the SDK you need to compile in your PC's number, can be viewed through the Android list,-P followed by your test project workspace path.
Second, modify the build file
Refresh eclipse, found that there are three more files, one of which is build.xml, double hit open build.xml file, the second line of default= "Help" modified to default= "build"
Third, compile
Ant-buildfile <build.xml file Full path >
After the package is compiled, a jar package is generated underneath the bin in the Java project directory
D. Push the build release jar package to the mobile/data/local/tmp/directory
ADB push <path_to_output_jar>/data/local/tmp/
Five, run the test
adb shell Uiautomator runtest <jars>-C < package name >.< class name >[#test name]
Android Wireless test-uiautomator compile and run test code