Uiautomator for android, path problem



  • i'm a newbie on linux, android and QA at the same time.

    following this tutorial:
    http://developer.android.com/tools/testing/testing_ui.html#sample
    I came across to this situation:

    filip@TowardMac:~/workspace_adt/TestSample$ ant build
    Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-7-openjdk-amd64/lib/tools.jar 
    Buildfile: /home/filip/workspace_adt/TestSample/build.xml
    
    -check-env:
     [checkenv] Android SDK Tools Revision 22.3.0
     [checkenv] Installed at /home/filip/Development/adt-bundle/adt-bundle-linux-x86_64-20131030/sdk
    
    -build-setup:
    [getbuildtools] Using latest Build Tools: 19.0.0
     [echo] Resolving Build Target for TestSample...
    [getuitarget] Project Target:   Android 4.1.2
    [getuitarget] API level:        16
     [echo] ----------
     [echo] Creating output directories if needed...
    [mkdir] Created dir: /home/filip/workspace_adt/TestSample/bin/classes
    
    -pre-compile:
    
    compile:
    
    BUILD FAILED
    /home/filip/Development/adt-bundle/adt-bundle-linux-x86_6420131030/sdk/tools/ant/uibuild.xml:183: 
    Unable to find a javac compiler;
    com.sun.tools.javac.Main is not on the classpath.
    Perhaps JAVA_HOME does not point to the JDK.
    It is currently set to "/usr/lib/jvm/java-7-openjdk-amd64/jre"
    
    Total time: 1 second
    filip@TowardMac:~/workspace_adt/TestSample$   
    

    can anyone see the solution to this problem?



  • It looks like you did not define Java. Please add JAVA_HOME to .bashrc



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2