Reputation: 4462
I'm trying to use google fit api for getting step count. I'm using the starter guide When i try to paste the code
private GoogleApiClient mClient = null;
Android studio can't find the "com.google.android.gms.common.api" package and the GoogleApiClient class.
i added
compile 'com.google.android.gms:play-services:7.0.0'
to my gradle.
Any suggestions? Thanks
EDIT:
I changed the gradle to compile 'com.google.android.gms:play-services:6.5.87' And now it works... does any one know why the 7.0.0 doesn't work? Thanks
Upvotes: 6
Views: 3357
Reputation: 11
I have met similar bug before, I finally solved this problem using Android Studio.
You can using below steps to check in Andorid studio.
1) Open File->Project Structure 2) Check the Module's Dependencies. Check Dependencies.
3) I add Google play service library in common module. So I need to add dependencies to other modules. Link dependencies to other modules
Hope this can help you.
Regards,
Richard
Upvotes: 1