Android Ant pack Error

Source: Internet
Author: User

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} "/&GT;&LT;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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.