Description From radim@kenai.com 2008-11-24 07:55:22
Version: 0.1 Source: nbadroid
NB6.5, Win Vista
After various trials and errors I get my android app into state when it
compiles (by adding -pre-compile hook into build.xml) and nbadroid launches
(running some app in emulator from eclipse that probably does some
bootstraping) the emulator but then it fails with
-sign:
Current OS is Windows Vista
Executing 'C:\Users\radim\android-sdk-windows-1.0_r1\tools\apkbuilder.bat' with
arguments:
'dist/AndroidApplication1.apk'
'-z'
'dist/AndroidApplication1.apk_'
The ' characters around the executable and arguments are
not part of the command.
Failed to create 'dist/AndroidApplication1.apk' : The system cannot find the
path specified
C:\Users\radim\Documents\NetBeansProjects\AndroidApplication1\nbproject\build-impl.xml:465:
exec returned: 1
at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:636)
at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:662)
at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:487)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at
org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:273)
at
org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:499)
at
org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
BUILD FAILED (total time: 15 minutes 38 seconds)
The good news is that this can be fixed by using absolute path in exec task
inside "-sign" target:
<target depends="init" name="-sign">
<exec executable="${apkbuilder}" failonerror="true">
<arg file="${dist.apk}"/>
<arg value="-z"/>
<arg file="${dist.apk}_"/>
</exec>
</target>
Comment #1 From afrank@kenai.com 2008-11-29 05:15:47 -------
The absolute path can be generated by adding the ${basedir}:
<exec executable="${apkbuilder}" failonerror="true">
<arg value="${basedir}/${dist.apk}"/>
<arg value="-z"/>
<arg value="${basedir}/${dist.apk}_"/>
</exec>