Reputation: 598
I'm trying to implement "SaveGame" with Google Play Services and I have the following error:
error: cannot find symbol
import com.google.android.gms.games.snapshot;
^
symbol: class snapshot
location: package com.google.android.gms.games
Anyone knows what can cause this?
Thanks!
Upvotes: 0
Views: 1202
Reputation: 598
I just found the issue.
It looks the issue was caused by having dependencies to gms in two modules, the module that was reporting the error was 8.4.0, but some other module had a dependency to 6.x.
Now I've changed everything to 8.4.0 and it compiles correctly.
Also the correct import is:
com.google.android.gms.games.snapshot.* since there is no class snapshot.
Upvotes: 1
Reputation: 6791
I think you have not yet imported the Google Play Services in your application. Kindly double check it.
For Eclipse:
Eclipse -> import -> existing android code -> browse -> navigate to google-play-services_lib FOLDER (android-sdk/extras/google/google_play_services/libproject).
then, on your project, control click -> properties -> android -> libraries, add -> select the project you just imported -> ok
For Android Studio build.gradle - app level
dependencies {
compile 'com.google.android.gms:play-services:8.4.0'
}
For more inquiries, check this link.
Upvotes: 0