Skip to content Skip to sidebar Skip to footer

Android Ant Uibuild.xml:198: Null Returned: 1

I am new to ant and Android uiautomator. When using ant to build my testing program I get: -dex: [dex] input: c:\Eclipse\workspace\Android\bin\classes [dex] Converting

Solution 1:

Not sure this is kosher answering my own question but...

I believe there is an error in the documentation (or the create step) for executing the build.xml file. The build.xml must be copied to the project directory, in my case AllAppsTest, and the 'ant build' command executed from there.

So the sequence of events to get this to work (in Windows command window):

  1. Run the 'android create' command

    c:\Eclipse\workspace\Android>android create uitest-project -n AllAppsTest -t 7 - p C:\Eclipse\workspace\Android\

  2. Switch to the AllAppsTest directory

    cd AllAppsTest

  3. Copy the build.xml file from the parent directory

    copy ../build.xml (which for some reason copies local.properties and project.properties also)

  4. Run the 'ant build' command

When I first tried this the build failed as it didn't like the single and double quotes I had that were on comment lines. Not sure why that was but I removed them and the ant build worked OK.

Post a Comment for "Android Ant Uibuild.xml:198: Null Returned: 1"