Using Eclipse IDE
Following the: https://developers.google.com/games/services/android/quickstart
- Using the copy of google-play-services_lib (as recommended) and imported as Eclipse project.
Editing the game manifest with:
Adding our APP ID to res/values/strings.xml
Linked google-play-services_lib with our game project and set references in Order and Export tabs in the project settings
In accordance with https://developers.google.com/games/services/android/init using the project BaseGameUtils, from which our activity cannot inherit, because there’s another class already.
So, we moved to the second method without inheriting (see Using GameHelper without BaseGameActivity). We linked google-play-services_lib for BaseGameUtils and set the Library (compilation went down OK).
Linking added to our project to be able to use GameHelper as well as google-play-services_lib.
At this moment SDK from Facebook started causing trouble, so we had to add android-support-v4.jar (used by BaseGameUtils as well) and error during compilation occurs:
Found 2 versions of android-support-v4.jar in the dependency list,
but not all the versions are identical (check is based on SHA-1 only at this time).
All versions of the libraries must be the same at this time.
Versions found are:
Path: /Users/travis/Work/Craneballs/Mafia_android/facebook-android-sdk/facebook/libs/android-support-v4.jar
Path: /Users/travis/Work/Craneballs/Mafia_android/BaseGameUtils/libs/android-support-v4.jar
- the project can be launched, but crashes on GoogleHelper = new GameHelper(this, GameHelper.CLIENT_ALL)
with the error message:
java.lang.NoClassDefFoundError: com.google.example.games.basegameutils.GameHelper
I’ve spent many painful hours on this and am at my wits end. Any ideas?