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.IOEx ception: 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) ... 46 more
在build.xml文件中添加,如下配置: <!-- 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}" />
版权声明:本文为博主原创文章,未经博主允许不得转载。
原文地址:http://blog.csdn.net/hello0370/article/details/47612803