Reputation: 3912
I am trying to set up my project in Eclipse to implement the new Android Play Services
. You can see in my below 3 screenshots that BibleTriviaLite
is my project and then BaseGameUtils
and google-play-services_lib
are the two projects that I imported in, made libraries and then made BibleTriviaLite
reference them.
Right now I have errors in every project. Basically every single import and built in class (TextView, Button, Bundle, Context, etc) all cannot be resolved to a type. I am guessing that I have my jars messed up somewhere. I never understood them fully so I am having a hard time trying to put all the jars in the correct spot and get my project working.
Before importing the 2 Android libraries (BaseGameUtils and google-play-services_lib), BibleTriviaLite was fully functional so I know the code works.
My question is how to successfully integrate these 2 Android libraries successfully into my main project so I can get on with integrating the leaderboards. If any specific code is needed in order to troubleshoot, let me know and I can provide. I have provided 3 screenshots below to show where all my jars are in each of the 3 projects.
Upvotes: 2
Views: 2262
Reputation: 3489
I encountered similar problems and I followed the guide at https://github.com/playgameservices/android-samples/blob/master/README.md which I found to be reasonably accurate.
Before adding either BaseGameUtils or the Google Play Services Lib to your project, I suggest that you should first resolve the errors in them. This is what I did:
1) I defined the Google Play Services Lib as a library project (Properties ... Android ... check "Is Library")
2) I added the Google Play Services Lib as a reference project to BaseGameUtils
3) I also added the ActionBarSherlock version of the support library to the libraries section of the Build Path of BaseGameUtils (if you do not use ABS then you will not need to do this)
4) I cleaned BaseGameUtils and this then removed the errors from BaseGameUtils.
5) I defined BaseGameUtils as a library project (Properties ... Android ... check "Is Library")
6) I then added BaseGameUtils and the Google Play Services Lib as reference projects to my project
This worked for me. Depending on circumstances, You may find now find that you have some additional issues (e.g. different versions of the support lib in your project. The solutions to this are well-documented on SO).
Good Luck !
Upvotes: 9