Can't use Location with latest google play services 7.5.0
My problem:
I am using the new instruction here https://developers.google.com/cloud-messaging/android/start to implement my own Android GCM app.
And, the problems I have with the piece of code that handles location tracking, it did work before, but now all the associated imports "don't exist". For example: (error: package com.google.android.gms.location does not exist)
import com.google.android.gms.location.LocationListener;
import com.google.android.gms.location.LocationRequest;
import com.google.android.gms.location.LocationServices;
All I have done:
- Add classpath 'com.google.gms: google-services: 1.3.0-beta1' to the top level assembly file.
- Add compilation 'com.google.android.gms: play-services: 7.5. + 'to my Gradle app.
What i tried
-
Try using com.google.android.gms: play-services: 7.3.0 instead and it works for location, but I'm not sure if GCM will work since I haven't finished it yet.
-
Try using com.google.android.gms: play-services: 7.5.0. This seems strong when the newest is 7.5.0, so 7.5. + Same since ~ 7.5.0. But he just tried and failed.
So, have you encountered this before? and how to solve please?
source to share
If you set the classpath 'com.google.gms:google-services:1.3.0-beta1'
as a dependency in the top level build
aplied plugin apply plugin: 'com.google.gms.google-services'
to build the app, root is
added compile "com.google.android.gms:play-services:7.5.+"
as a dependency on the build of the app, and after sync you will see a message error instal support reposotory
, just click on it and install the repository from the wizard
source to share