如何从GIT子模块安装Google Play Services库
-
21-12-2019 - |
题
好的,我知道这个问题已经问过。但通常的解决方案是将“复制到工作空间”复选框。(我相信对我来说甚至是一个选择,因为即使我这样做,我也会得到同样的问题)。
但这对我来说并不是一个很好的解决方案,因为我在我的git存储库中添加了库作为子模块,通常在开发(工作和家庭)时切换计算机。我希望该项目在主要项目中作为一个图书馆项目进行参考。
我不敢相信这是无法完成的。但我尝试了很多组合,我几乎放弃了。
有趣的是,一旦我将其引用为项目在“Android”部分的属性面板中,它显示了绿色复选标记。但是一旦我关闭面板然后再次打开它,我就会得到红十字会.. WTF!?
解决方案
Add the Google Play Services project into your Eclipse workspace.
Click File -> Import..., select Android -> Existing Android Code into Workspace
Browse to and select <android-sdk-folder>/extras/google/google_play_services/libproject/google-play-services_lib
To add the dependency to Google Play Services into your project
Project -> Properties -> Android -> Library, Add -> google-play-services_lib
.
不隶属于 StackOverflow