I want to build, install and run the tests of a UiAutomator project through the command line.
In the previous version I was doing:
android create uitest-project -n <project_name> -p <project_path> -t <target_id>
ant build
to build and then
adb push <jar_path> /data/local/tmp
to install and finally
adb shell uiautomator runtest <jar_name> -c <main_class>
However, right now I'm stuck in the building part.
The result is
-check-env:
[checkenv] Android SDK Tools Revision 24.1.2
[checkenv] Installed at C:\Android
-build-setup:
[getbuildtools] Using latest Build Tools: 22.0.0
[echo] Resolving Build Target for AndroidExplorerTester...
[getuitarget] Project Target: Android 5.0.1
[getuitarget] API level: 21
[echo] ----------
[echo] Creating output directories if needed...
-pre-compile:
compile:
-post-compile:
-dex:
[dex] input: <test_path>\bin\classes
[dex] Converting compiled files and external libraries into <test_path>\bin\classes.dex...
[dx] no classfiles specified
BUILD FAILED
C:\Android\tools\ant\uibuild.xml:198: null returned: 1
Total time: 1 second
I don't know if there is a better way to do it now since the new version of UiAutomator.
Note: I don't know if it matters but I was using Eclipse before and now I'm using IntelliJ (Android Studio if you prefer lol)
Aucun commentaire:
Enregistrer un commentaire