I configured my android project to use ant. When building using the keyword release it fails with this message:
java.lang.NullPointerException
at com.android.ant.ApkBuilderTask.execute(ApkBuilderTask.java:239)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
It fails on build.xml line 249 which is included here:
<macrodef name="package-helper">
<attribute name="sign.package" />
<element name="extra-jars" optional="yes" />
<sequential>
<apkbuilder
outfolder="${out.absolute.dir}"
basename="${ant.project.name}"
signed="@{sign.package}"
debug="${manifest.debuggable}"
verbose="${verbose}"> **LINE 249 IS HERE**
<file path="${intermediate.dex.file}" />
<sourcefolder path="${source.absolute.dir}" />
<sourcefolder refid="android.libraries.src" />
<jarfolder path="${external.libs.absolute.dir}" />
<jarfolder refid="android.libraries.libs" />
<nativefolder path="${native.libs.absolute.dir}" />
<nativefolder refid="android.libraries.libs" />
<extra-jars/>
</apkbuilder>
</sequential>
</macrodef>
That is called from line 401 which contains these lines:
<target name="-package-release" depends="-dex, -package-resources">
<package-helper sign.package="false" />
</target>
It looks like there is some problem with ApkBuilderTask.java but I don't know how/where to get the source of ApkBuilderTask.java. Has anyone run into this problem and found a solution? I'm using android SDK tools revision 7 if that helps.
Note: Running "ant debug" or "ant release" all comes out to the same result.