playgameservices / android-basic-samples

Google Play game services - Android samples
Apache License 2.0
972 stars 970 forks source link

Splitting Google Play Services makes GameUtils not compiling #130

Closed cesards closed 9 years ago

cesards commented 9 years ago

I have stripped the Play Services, not to reach the 65k methods.

My GameHelper class doesn't compile because of the import com.google.android.gms.appstate.AppStateManager dependancy.

I am using the following Play Services

// Google Play Services
compile "com.google.android.gms:play-services-plus:${PLAY_SERVICES_VERSION}"
compile "com.google.android.gms:play-services-identity:${PLAY_SERVICES_VERSION}"
compile "com.google.android.gms:play-services-location:${PLAY_SERVICES_VERSION}"
compile "com.google.android.gms:play-services-appindexing:${PLAY_SERVICES_VERSION}"
compile "com.google.android.gms:play-services-games:${PLAY_SERVICES_VERSION}"
compile "com.google.android.gms:play-services-base:${PLAY_SERVICES_VERSION}"

I cannot find wehre is localted AppStateManager in the separated services. Any help is appreciated!!

cesards commented 9 years ago

Ok solved, thanks to this post I have discovered there is a lack of documentation in the official site: https://developer.android.com/google/play-services/setup.html#split

compile 'com.google.android.gms:play-services-appstate:6.5.87' was needed

claywilkinson commented 9 years ago

Thanks for the details @cesards. Appstate (aka CloudSave) is a deprecated API (see https://developers.google.com/games/services/android/savedgames). Do you use it? If you are looking to strip out methods, maybe removing all the references to AppStateManager would help towards that end?