【发布时间】:2013-11-21 11:38:18
【问题描述】:
我使用 Cordova 3.0 的 phonegap/cordova 应用程序运行良好。然后我出于不相关的原因将我的 Android SDK 更新到 4.3(更准确地说是 Titanium 应用程序),突然构建失败,出现以下错误:
...
-code-gen:
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
[echo] Handling aidl files...
[aidl] Found 1 AIDL files.
[aidl] Compiling 1 AIDL files.
BUILD FAILED
/Applications/adt-bundle/sdk/tools/ant/build.xml:647: The following error occurred while executing this line:
/Applications/adt-bundle/sdk/tools/ant/build.xml:653: Execute failed: java.io.IOException: Cannot run program "/Applications/adt-bundle/sdk/platform-tools/aidl" (in directory "/Users/cool/Dropbox/Workspaces/Cordova3Plus/TrueBudgetFree/platforms/android"): error=2, No such file or directory
...
Caused by: java.io.IOException: error=2, No such file or directory
...
我检查了文件位置,然后...
//the aidl executable isn't actually in
Applications/adt-bundle/sdk/platform-tools/
//Instead, it is in a ser
Applications/adt-bundle/sdk/build-tools/[sdk version]/
有几个 SDK 版本(17.0.0 到 19.0.0 和“Android-4.3”)的子文件夹。这些目录中的每一个都有aidl 可执行文件。
我尝试将 ../sdk/build-tools 文件夹添加到我的 $PATH (Mac),但没有帮助。
我假设构建器将版本名称插入到路径字符串中,但我无法确定,因为我不了解这些构建过程的内部工作原理。我能看到的只是路径被引用/编辑的地方。
第 647/653 行的 build.xml 有这样的代码:
<echo level="info">Handling aidl files...</echo>
<aidl executable="${aidl}"
framework="${project.target.framework.aidl}"
libraryBinAidlFolderPathRefid="project.library.bin.aidl.folder.path"
genFolder="${gen.absolute.dir}"
aidlOutFolder="${out.aidl.absolute.dir}">
<source path="${source.absolute.dir}"/>
</aidl>
我发现this comment 表明aidl 文件在使用新的SDK 时会偶尔移动。
我尝试恢复到 Android SDK 4.2,但没有帮助。
这可能是什么原因(更重要的是:解决方案)?
【问题讨论】: