2

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

Community
  • 1
  • 1
inquisitive
  • 3,738
  • 6
  • 30
  • 56
  • Do you have a folder with ProjectName in your workspace?? and did you give command `android create uitest-project -n -t 1 - p ` ? – Anvesh Yalamarthy Sep 05 '14 at 11:41
  • @Anvesh Yalamarthy: In eclipse I can see the folder `ProjectName`, but not in cmd prompt. Also I used the command `android create uitest-project -n -t -11 -p ` didn't mention the ProjectName after the path But when I do so, I get another error-`java.io.FileNotFoundException: path\to\workspace\ProjectName\local.properties ` – inquisitive Sep 05 '14 at 12:02
  • 2
    Yes it wont work that way.. while creating the project using `android create`, this command should be issued in `ProjectName` Folder and `build.xml` should be created in `ProjectName` folder.. So give a try to create `ProjectName` folder and try to move relevant files to that folder and give `android create` command again.. – Anvesh Yalamarthy Sep 05 '14 at 13:53

2 Answers2

1

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

Anvesh Yalamarthy
  • 1,625
  • 20
  • 36
1

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.

Jacob Abraham
  • 915
  • 9
  • 8