我正在尝试使用 ANT 构建我的应用程序,但在包含 google-play-services-lib 库项目后我失败了。
第 1 步
我在我的 project.properties 文件中设置了对库项目的引用:
android.library.reference.1=/path/to/google-play-services_lib
第 2 步
我在 google-play-services_lib 文件夹中运行了这些命令:
android update lib-project --path .
ant clean
ant release
建立成功!
第 3 步
回到我的项目文件夹
ant clean
ant release
错误
BUILD FAILED
/android/tools/ant/build.xml:460: /path/to/google-play-services_lib resolve to a path with no project.properties file for project /my/project-folder
两个文件夹中都有一个 project.properties,自然而然。 google-play-services_lib 中的那个包含以下代码:
target=android-8
android.library=true
我显然错过了摆在我面前的东西,非常感谢您的帮助。谢谢!
最佳答案
尝试将 android 库引用更改为相对路径(相对于当前目录)而不是绝对路径。
例如
android.library.reference.1=../../../relative_path/to/google-play-services_lib
关于java - Android:ANT 构建失败并出现 google-play-services-lib: "resolve to a path with no project.properties file for project",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21265111/