How to implement Google Play with your Android app

I’ve been trying to do this for several days and I just can not figure it out the problem.
I’ve followed the instructions on the android developer page like so:

I’ve added both the libraries to my project:

BaseGameUtils
google-play-services_lib

BaseGameUtils references google-play-services_lib

my project references both BaseGameUtils and google-play-services_lib

I get this error:
The type com.google.android.gms.common.GooglePlayServicesClient$OnConnectionFailedListener cannot be resolved. It is indirectly referenced from required .class files SDLActivity.java /ChainDrop/src/org/libsdl/app line 1 Java Problem

I also get this error but I’m not sure if it has anything to do with the issue:
[2014-01-29 13:17:37 - ChainDrop] Found 2 versions of android-support-v4.jar in the dependency list,
[2014-01-29 13:17:37 - ChainDrop] but not all the versions are identical (check is based on SHA-1 only at this time).
[2014-01-29 13:17:37 - ChainDrop] All versions of the libraries must be the same at this time.
[2014-01-29 13:17:37 - ChainDrop] Versions found are:
[2014-01-29 13:17:37 - ChainDrop] Path: H:\Programming\libs\BaseGameUtils\libs\android-support-v4.jar
[2014-01-29 13:17:37 - ChainDrop] Length: 385685
[2014-01-29 13:17:37 - ChainDrop] SHA-1: 48c94ae70fa65718b382098237806a5909bb096e
[2014-01-29 13:17:37 - ChainDrop] Path: H:\Programming\C++\Projects\ChainDrop\Android\libs\android-support-v4.jar
[2014-01-29 13:17:37 - ChainDrop] Length: 627582
[2014-01-29 13:17:37 - ChainDrop] SHA-1: db0f122c99ef9f90dbab3fada6d191f2880cbb8e
[2014-01-29 13:17:37 - ChainDrop] Jar mismatch! Fix your dependencies

I can some code for you once i am at home.Am 29.01.2014 19:19 schrieb “ronkrepps” :

I’ve been trying to do this for several days and I just can not figure
it out the problem.
I’ve followed the instructions on the android developer page like so:

I’ve added both the libraries to my project:

BaseGameUtils
google-play-services_lib

BaseGameUtils references google-play-services_lib

my project references both BaseGameUtils and google-play-services_lib

I get this error:
The type
com.google.android.gms.common.GooglePlayServicesClient$OnConnectionFailedListener
cannot be resolved. It is indirectly referenced from required .class files
SDLActivity.java /ChainDrop/src/org/libsdl/app line 1 Java Problem

I also get this error but I’m not sure if it has anything to do with the
issue:
[2014-01-29 13:17:37 - ChainDrop] Found 2 versions of
android-support-v4.jar in the dependency list,
[2014-01-29 13:17:37 - ChainDrop] but not all the versions are identical
(check is based on SHA-1 only at this time).
[2014-01-29 13:17:37 - ChainDrop] All versions of the libraries must be
the same at this time.
[2014-01-29 13:17:37 - ChainDrop] Versions found are:
[2014-01-29 13:17:37 - ChainDrop] Path:
H:\Programming\libs\BaseGameUtils\libs\android-support-v4.jar
[2014-01-29 13:17:37 - ChainDrop] Length: 385685
[2014-01-29 13:17:37 - ChainDrop] SHA-1:
48c94ae70fa65718b382098237806a5909bb096e
[2014-01-29 13:17:37 - ChainDrop] Path:
H:\Programming\C++\Projects\ChainDrop\Android\libs\android-support-v4.jar
[2014-01-29 13:17:37 - ChainDrop] Length: 627582
[2014-01-29 13:17:37 - ChainDrop] SHA-1:
db0f122c99ef9f90dbab3fada6d191f2880cbb8e
[2014-01-29 13:17:37 - ChainDrop] Jar mismatch! Fix your dependencies


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I’ve already implemented the Swarmconnect api (similar to google play games services) without a problem. But I want to test out googles version.

I understand the c++ to java calling and vice versa.

It’s just getting the project built that is giving me trouble. I’ve followed a couple different tutorials/how tos and doing each version gives me a different error.

I finally figured it out…

I had to go into the Java Build Path and remove BaseGameUtils and google-play-services_lib from there.

Also to remove another error I had to go into the libraries section and add the two jars (basegameutils.jar and google-play-services.jar.)

I’m not sure why the second part was nowhere in the instructions… but it fixed the problem.