我在 MacOS 或 Linux 下有一个新的 android 项目 (APP) 和一个新的 android lib 项目 (LIB),由命令行创建,如http://developer.android.com/guide/developing/projects/projects-cmdline 中所述。 .html _
APP 使用 ant 调试成功构建(未连接 LIB)。当我将 APP 文件夹中的库与相对路径链接时,如下所示:
android update project --library ../TestLib --target android-9 --name TestApp --path .
一切正常,ant debug构建APP。但是当我将它与绝对路径链接时
android update project --library /Users/<path-to-lib-folder>/TestLib --target android-9 --name TestApp --path .
ant 调试构建失败。
为什么绝对路径和相对路径之间存在差异?在我们的自动化 ant 构建过程中,我们需要使用绝对路径。如何实现这一点?