How to install the Google Play Services library from a git submodule
-
21-12-2019 - |
Question
Ok I know this question has been asked before. But the usual solution is to mark the "copy into the workspace" checkbox. (Which I believe is not even an option for me because even when I do that I get the same problem).
But that is not really a good solution to me, as I added the library as a submodule in my git repository and usually switch computers while developing (work and home). I would like the project to make a reference to it as a library project INSIDE the main project.
I cannot believe this can't be done. But I've tried lots of combinations and I'm almost giving up.
The funny thing is that as soon as I reference it as a project in the "Android" section of the Properties panel, it shows a green check mark. But as soon as I close the panel and then open it again, I get the red cross.. WTF!?
Solution
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
and even and refer this