安装Android SDK工具版本14(ant-version时为ant版本1.8.2)在Android 4.0(ICS)上安装和测试我们的应用程序后,我注意到我们的自动构建脚本现在失败了.构建脚本正在执行一个ant命令来构建apk,在修改更新后抱怨build.xml文件已过期并执行ant更新项目-p来修复此问题.我们的项目有一个顶级项目和它引用的两个图书馆项目,都是用IntelliJ开发的.在删除旧的build.xml文件后,我在每个项目文件夹中运行了update project命令.现在我收到以下消息:
<SDK_DIR>/tools/ant/build.xml:466: The following error occurred while executing this line:
<SDK_DIR>/tools/ant/build.xml:539: The following error occurred while executing this line:
<SDK_DIR>/tools/ant/build.xml:568: null returned: 1
Run Code Online (Sandbox Code Playgroud)
我已经在下面包含了主项目和库项目build.xml文件的代码(每个都相同):
<?xml version="1.0" encoding="UTF-8"?>
<project name="LaunchActivity" default="help">
<loadproperties srcFile="local.properties" />
<property file="ant.properties" />
<loadproperties srcFile="project.properties" />
<fail
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'"
unless="sdk.dir"
/>
<import file="${sdk.dir}/tools/ant/build.xml" />
</project>
Run Code Online (Sandbox Code Playgroud)
使用新的project.properties文件(如下):AppMain(非库项目):
android.library.reference.1=../Common
android.library.reference.2=../facebook
# Project target.
target=Google Inc.:Google APIs:8
Run Code Online (Sandbox Code Playgroud)
共同(图书馆项目):
android.library=true
# Project target.
target=Google Inc.:Google APIs:8
Run Code Online (Sandbox Code Playgroud)
facebook(图书馆项目):
android.library=true …Run Code Online (Sandbox Code Playgroud) 我有两个使用公共库的Android应用程序.每个项目都为启动画面和其他一些项目定义了自己的背景图像.这些图像在两个应用程序中具有相同的名称.
当我从eclipse构建/运行时,每个应用程序都使用正确的背景图像.但是,当我运行我的ant构建文件时,在打包资源时内容会混淆,并且两个应用程序都使用相同的图像.
我确定在某个地方有一个我需要清除的缓存,但我找不到它(在MacOSX Lion上运行).
我尝试了-f选项appt,但仍然是同样的问题.
有谁知道如何解决这个问题?