inquisitive
inquisitive

Reputation: 3974

Ant build failed: uibuild.xml: 198 null returned: 1

Please refer to this question, as I am having the same problem. The answer over there does not solve my problem.

This is the stdout detail:

Buildfile: F:\s2dworkspace\build.xml
-check-env:
 [checkenv] Android SDK Tools Revision 23.0.2
 [checkenv] Installed at C:\Users\anshu\android-sdks

-build-setup:
[getbuildtools] Using latest Build Tools: 20.0.0
     [echo] Resolving Build Target for BookWormTest...
[getuitarget] Project Target:   Google APIs (x86 System Image)
[getuitarget] Vendor:           Google Inc.
[getuitarget] Platform Version: 4.4.2
[getuitarget] API level:        19
     [echo] ----------
     [echo] Creating output directories if needed...

-pre-compile:
 compile:
-post-compile:

-dex:
 [dex] input: F:\s2dworkspace\bin\classes
       [dex] Converting compiled files and external libraries into F:\s2dworkspace\bin\classes.dex...
      [dex] Converting compiled files and external libraries into F:\s2dworkspace\bin\classes.dex...
   [dx] no classfiles specified

And then later it gives the error:

c:\Users\..\android-sdks\tools\ant\uibuild.xml: 198 null returned: 1

There are several questions related but are unanswered- Q1. Q2. Q3. My project is located in

F:\s2dworkspace

I had sdktools in other directory from where I run the command to create the build.xml and it was created properly.

and i m running the command as

F:\s2dworkspace> ant build

Also, I think it is worth mentioning that the project name is BookWorkTest and I can not do

F:\s2dworkspace> cd BookWormTest 

when I do

F:\s2dworkspace> dir

I can see there is a file called build.xml

Upvotes: 2

Views: 2318

Answers (2)

Jacob Abraham
Jacob Abraham

Reputation: 934

This error happened to me once. This happened when I did "ant build" when there was no source file in the src folder. If you add the source files to the src directory, this will work fine.

There is a better way to create android Ui automator test cases in eclipse. At first create a java project in eclipse. Then import the jar libraries for junit and uiautomator into the project. Then in a separate folder create UIAutomatorTestproject using "android create uitest-project ..." command with the project name same as the java project name. Then import the test project directory into the java project in eclipse. Then you can use all the capabilities of the ide for speeding up the coding.

Upvotes: 1

Anvesh Yalamarthy
Anvesh Yalamarthy

Reputation: 1693

Create the project using android create, this command should be issued in ProjectName Folder and build.xml should be created in ProjectName folder.. try to create ProjectName folder and move relevant files to that folder and give android create command again

Upvotes: 1

Related Questions