【发布时间】:2012-06-30 13:25:10
【问题描述】:
几个月来我一直在使用 ant 构建我的项目,直到昨天刚刚发布的 r20 之前都没有出现任何问题。我基本上只是使用默认构建文件提供的钩子来做一些小改动。我的项目正在使用 2 个库项目,并且构建在 eclipse 中运行良好。但是我使用 ant 进行官方签名构建(我的目标是创建构建,我的应用程序将连接到生产、登台或 qa 环境)。 这是我收到的错误消息:
构建失败/Users/mwolfe/workspace/android-flex/app/build.xml:99: 执行此行时发生以下错误: /Users/mwolfe/lib/android-sdk/tools/ant/build.xml:476: ../shared/SomeSdk/sdk 解析为没有 project.properties 的路径 项目文件 /Users/mwolfe/workspace/android-flex/shared/SomeSdk/sdk
但是,我确信此文件夹中有一个 project.properties 文件,并且以前可以正常工作。查看 android 的 build.xml 中的第 476 行,它有:
<!-- clean target -->
<target name="clean" depends="-setup, -pre-clean"
description="Removes output files created by other targets.">
<delete dir="${out.absolute.dir}" verbose="${verbose}" />
<delete dir="${gen.absolute.dir}" verbose="${verbose}" />
<!-- if we know about a tested project or libraries, we clean them too. -->
<if condition="${project.is.test}">
<then>
<property name="tested.project.absolute.dir" location="${tested.project.dir}" />
<subant failonerror="true">
<fileset dir="${tested.project.absolute.dir}" includes="build.xml" />
<target name="clean" />
</subant>
</then>
</if>
<!-- get all the libraries -->
<if>
<condition><not><isset property="dont.do.deps" /></not></condition>
<then>
<!-- LINE 476 HERE: --> <getlibpath libraryFolderPathOut="project.library.folder.path" />
<if>
<condition>
<isreference refid="project.library.folder.path" />
</condition>
<then>
<!-- clean the libraries with nodeps since we already
know about all the libraries even the indirect one -->
<subant
buildpathref="project.library.folder.path"
antfile="build.xml"
failonerror="true">
<target name="nodeps" />
<target name="clean" />
</subant>
</then>
</if>
</then>
</if>
</target>
任何想法是什么导致了这个问题以及如何解决它?
【问题讨论】:
标签: android ant android-build