使用我当前的 android 工具,我可以在 Eclipse 中构建一个 android 项目。当我尝试从命令行使用 ant 构建相同的项目时,它失败并显示以下输出:
-build-setup:
[echo] Creating output directories if needed...
-pre-build:
-code-gen:
[echo] ----------
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[renderscript] No RenderScript files to compile.
[echo] ----------
[echo] Handling Resources...
[aapt] Found Deleted Target File
[aapt] Generating resource IDs...
[aapt] invalid resource directory name: /data/project/res/drawable-xxhdpi
BUILD FAILED
/android-sdk-mac_x86/tools/ant/build.xml:485: The following error occurred while executing this line:
/android-sdk-mac_x86/tools/ant/build.xml:560: The following error occurred while executing this line:
/android-sdk-mac_x86/tools/ant/build.xml:589: null returned: 1
据我了解,drawable-xxhdpi 现在是受支持的格式,那么为什么这在 Eclipse 中有效,但在 ant 中无效?
== 编辑(添加我的 project.properties 文件)== 这是我的 project.properties 文件中的内容:
android.library.reference.1=resources/
android.library.reference.2=../promotion
# Project target.
target=android-8
android.library.reference.3=resources/
android.library.reference.4=resources/