I haven't seen this problem anywhere on the internet, also it doesn't seem the library is deprecated, but I just can't add the import:
import com.google.android.gms.location.places.GeoDataClient;
My Android SDK is up to date.
Does anyone know how to use it? Or rather, another way to get my current location on GPS?
Thanks a lot.
just add:
compile 'com.google.android.gms:play-services-places:11.2.0'
and
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
because GeoDataClient was added in 11.2.0 you can check this official document
Try to add
```gradle
compile 'com.google.android.gms:play-services-maps:11.2.0'
compile 'com.google.android.gms:play-services-places:11.2.0'
compile 'com.google.android.gms:play-services:11.2.0'
compile 'com.google.android.gms:play-services-location:11.2.0'
```
in build.gradle
, then you may need add
```gradle
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
```
finally, Build -> rebuild project.
Adding just this one dependency to apps
build.gradle
compile 'com.google.android.gms:play-services:11.8.0'
and below code to project's
build.gradle should work.
allprojects {
repositories {
google()
jcenter()
maven {
url "https://maven.google.com"
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With