NullPointerException in com.android.ant.ApkBuilderTask.execute when building with ant -


I have configured my Android project to use ant when using the keyword release it failed with this message :

  java.lang.NullPointerException at com.android.ant.ApkBuilderTask.execute (ApkBuilderTask.java url) org.apache.tools (unknown source)  

This build.xml line fails on 249 which is included here:

/ P>

  & lt; Macrodef name = "package-helper" & gt; & Lt; Attribute name = "sign pokes" /> & Lt; Element name = "extra-jars" alternate = "yes" /> & Lt; Sequential & gt; & Lt; Signed on apkbuilder outfolder = "$ {out.absolute.dir}" basename = "$ {ant.project.name}" = "@ {sign.package}" debug = "$ {manifest.debuggable}" verbose = " $ {Verbose} "& gt; ** LINE 249 is here ** & lt; File path = "$ {intermediate.dex.file}" /> & Lt; SourceFolder Path = "$ {source.absolute.dir}" /> & Lt; SourceFolder Refied = "android.libraries.src" /> & Lt; Jarfolder path = "$ {external.libs.absolute.dir}" /> & Lt; Jarfolder refid = "android.libraries.libs" /> & Lt; Root folder path = "$ {native.libs.absolute.dir}" /> & Lt; BasicFolderRefid = "android.libraries.libs" /> & Lt; Extra jar / & gt; & Lt; / Apkbuilder & gt; & Lt; / Sequential & gt; & Lt; / Macrodef>  

This is called line 401, which includes these lines:

   & Lt; / Target & gt;  

It seems that there is some problem with ApkBuilderTask.java but I do not know how to get the source of ApkBuilderTask.java. Has anyone participated in this problem and found a solution? I am using the Android SDK tool if it helps.

Note: Running "ant debug" or "ant release" all come out for the same result.

This is a change that has been introduced in the R7 tool. You can see & lt; Apkbuilder & gt; needs to update the work in your build.xml , as shown above on Saturday.

This error occurs only when you customize your build.xml, I think that you will have to go back and recreate the optimization if you have $ ANDROID_SDK / tools / ant / Ant_rules_r3_x3.xml and paste them into your build.xml (you've replaced the previously stuck definitions), then it should fix your problems.

You can get away without the customization, because the new version of the rules is more customizable, and -pre-compile and -post-compile Hook


Comments