蚂蚁的jar错误:执行失败:产生java.io.IOException:不能运行程序... $ {AAPT}":错误= 2,没有这样的文件或目录 [英] ant jar error: Execute failed: java.io.IOException: Cannot run program...${aapt}": error=2, No such file or directory

查看:457
本文介绍了蚂蚁的jar错误:执行失败:产生java.io.IOException:不能运行程序... $ {AAPT}":错误= 2,没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图编译统一一个简单的Java库,并运行ant罐子后,我得到以下信息:

I'm trying to compile a simple Java library for Unity, and after running ant jar, I get the following message:

/Applications/adt-bundle-mac-x86_64-20140702/sdk/tools/ant/build.xml:649: The following error occurred while executing this line:
/Applications/adt-bundle-mac-x86_64-20140702/sdk/tools/ant/build.xml:694: Execute failed: java.io.IOException: Cannot run program "/Users/****/UnityProjects/****/JavaTestPlugin/${aapt}": error=2, No such file or directory

这是奇怪的,因为我已经编译这个类之前成功了,我拥有一切,我觉得我需要的。即Android的工作室,和相关的软件包(工具,Android的4/5​​,等等)。我注意到,AAPT不在我的ADT-包/ SDK /平台工具目录,但它是在集结工具的目录之一。甚至包括我的路径没有帮助后者。

This is strange, because I've compiled this class before successfully, and I have everything I would think I need. Namely Android Studio, and related packages (Tools, Android 4/5, etc). I noticed that aapt is not located in my adt-bundle/sdk/platform-tools directory, but it is in one of the build-tools directories. Even including the latter in my path did not help.

不管怎样,我正在运行的Mac OS 10.10.3,用最先进的最新版本的Andr​​oid工作室。此类升级到优胜美地之前编译。我已经看到了如何解决这个问题的建议,但所有这些建议也适用于Linux,而不是到Mac OS。

Anyway, I am running Mac OS 10.10.3, with the most up-to-date version of Android Studio. This class compiled before upgrading to Yosemite. I've seen suggestions on how to fix this issue, but all of those suggestions apply to Linux as opposed to Mac OS.

推荐答案

你有没有更新的Andr​​oid SDK工具24.3.2?这似乎造成了问题。添加下面的4行Android的SDK路径/工具/ ANT / build.xml的起跑线上484,并希望它应该解决的问题。

Have you updated the Android SDK tools to 24.3.2? This seems to have caused the issue. Add following 4 lines to android-sdk-path/tools/ant/build.xml starting line 484 and hopefully it should solve.

<property name="aidl" location="${android.build.tools.dir}/aidl${exe}" />
<property name="aapt" location="${android.build.tools.dir}/aapt${exe}" />
<property name="dx" location="${android.build.tools.dir}/dx${bat}" />
<property name="zipalign" location="${android.build.tools.dir}/zipalign${exe}" />

这篇关于蚂蚁的jar错误:执行失败:产生java.io.IOException:不能运行程序... $ {AAPT}&QUOT;:错误= 2,没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆