Home Download Buy Blog Forum Support

Build Android APKs with ANT

Build Android APKs with ANT

Postby radikaledward on Fri Feb 01, 2013 2:00 pm

Hi, this is my first message here.

I already checked the forum for similar messages but I found nothing related.

I am trying to build an APK from ANT.
The ANT script works perfectly well from the command line.

When I create a build system for my project to build the APK I get an error.
Code: Select all
/home/lab/_Dev/tel_acs/acs_embd_android/applis/build.xml:97: Execute failed: java.io.IOException: Cannot run program "android" (in directory "/home/lab/_Dev/tel_acs/acs_embd_android/applis"): java.io.IOException: error=2, No such file or directory
   at java.lang.ProcessBuilder.start(ProcessBuilder.java:475)
   at java.lang.Runtime.exec(Runtime.java:610)
        ...


The problem is that "android" command is in my path but apparently Sublime Text cannot find it.
This is a PATH issue because Sublime Text uses the default path, not the user's path [I know it because I tried to run a shell script to find out what was happening).

I would like my build system to be able to launch ANT.
I don't want to write a separate shell script to by launched from the Build System.

Here is the Build System definition for my project:
Code: Select all
"build_systems":
    [
        {
            "name": "Build JB",
            "cmd": [
               "ant",
               "-f",
               "${project_path}/tel_acs/acs_embd_android/applis/build.xml",
                "all"
            ]
        },
        {
            "name": "Env",
            "cmd": ["~/_Dev/env.bash"],
            "shell": true
        }
    ]


Does anybody have any advice ?
radikaledward
 
Posts: 1
Joined: Fri Feb 01, 2013 1:43 pm

Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot] and 29 guests