The following error occurred when packing with Ant today
Error message:
D:\android-sdk\android-sdk\tools\ant\build.xml:649:the following error occurred while executing this line:D:\ Android-sdk\android-sdk\tools\ant\build.xml:694:execute failed:java.io.IOException:Cannot Run Program "D:\ WORKSPACE\TEST\${AAPT} ": CreateProcess error=2,????????? ... caused By:java.io.IOException:CreateProcess error=2,????????? At Java.lang.ProcessImpl.create (Native Method) at java.lang.processimpl.<init> (processimpl.java:189) At Java.lang.ProcessImpl.start (processimpl.java:133) at Java.lang.ProcessBuilder.start ( processbuilder.java:1021) ... More
Solution:
Add the following configuration in the Build.xml file: <!--tools location--><property name= "Android.tools.dir" location= "${sdk.dir}/tools" /><property name= "Android.platform.tools.dir" location= "${sdk.dir}/platform-tools"/><property name= " Android.buildtools.dir "location=" ${sdk.dir}/build-tools/<span style= "color: #cc0000;" ><strong><u>21.1.2</u></strong></span> "/><condition property=" EXE "value= ". exe" else= "><os family=" Windows "/></condition><condition property=" Bat "value=". bat "Else=" " ><os family= "Windows"/></condition><property name= "adb" location= "${android.platform.tools.dir} /adb${exe} "/><property name=" Lint "location=" ${android.tools.dir}/lint${bat} "/><property name=" Zipalign "location=" ${android.buildtools.dir}/zipalign${exe} "/><property name=" Aidl "location=" ${ Android.platform.tools.dir}/aidl${exe} "/><property name=" aapt "location=" ${android.buildtools.dir}/aapt${ EXE} "/><property name= "DX" location= "${android.buildtools.dir}/dx${bat}"/><property name= "Renderscript" location= " ${android.buildtools.dir}/llvm-rs-cc${exe} "/><property name=" Lint "location=" ${android.tools.dir}/lint${ BAT} "/>
cause of error:. /ant/build.xml There is no configuration for tools, the Build-tools I use here is 21.1.2 .
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Android Ant pack Error