I having a errorCannot resolve symbol 'FusedLocationProviderClient' while declaring
private FusedLocationProviderClient mFusedLocationClient;
The same is asked here Cannot Resolve Symbol: FusedLocationProviderClient. Google play services version used 11.0.1 . But still am having the error while using the latest play services.
FusedLocationProvider is part of play-services-location. You are using play-services-maps. Add dependency :
compile 'com.google.android.gms:play-services-location:11.6.0'
Edit
Seems like this was helpful for quite a few people. Here is a link to google docs where all individual library names in play-services along with latest version numbers are kept : https://developers.google.com/android/guides/setup I hope google keeps it updated.
Note: It's recommended to use Google Play services version 11.6.0 or higher, which includes bug fixes for this class. More details here.
https://developers.google.com/android/reference/com/google/android/gms/location/FusedLocationProviderClient
Related
I have the following library for the google maps and it works fine
implementation 'com.google.android.gms:play-services-maps:16.1.0'
But when I try to add this one for location,
implementation 'com.google.android.gms:play-services-location:16.1.0'
the following error occurs
Failed to resolve: com.google.android.gms:play-services-location:16.1.0
Which library for the location should I use?
THANK YOU.
You will get latest gradle dependencies here
https://developers.google.com/android/guides/setup
It is probably because 16.1.0 does not exist for this library. Google Play Services libraries do not always have the same version. So maps might be on 16.1.0 but location might not even have this version.
To get the latest versions, check the official release page: https://developers.google.com/android/guides/releases
And as you are just starting, make sure to use the latest ones:
com.google.android.gms:play-services-location:17.0.0
com.google.android.gms:play-services-maps:17.0.0
Yes, it is a coincident that those versions are currently the same. As you can see in the list there are already libraries on 19.0.0, like appindexing
com.google.firebase:firebase-appindexing:19.0.0
Edit
A small practical tip: If you replace the version by + and sync the project, gradle will get the newest one and afterwards you can use the IDE warning to replace the + again with the newest version number. That eases a bit the checking on different pages if there is a new version or not etc
I want to use Google places API but I can't sync the project with "com.google.android.libraries.places:1.0.0:" dependency. How to add the places in my project?.
The library in documentation is wrong I guess, use this, it works.
I had same issue few days back , gave a feedback to them on documentation they still didn't fix it.
implementation 'com.google.android.libraries.places:places:2.1.0'
You can see how to add places autocomplete over here
Edit: Seems like they finally fixed the documentation
try to change
compileOnly "com.facebook.react:react-native:+"
by
api "com.facebook.react:react-native:+"
I also stuck with the same issue, now i removed this issue. According to google,
"The v1.0.0 release of the Places SDK for Android introduces an all-new static library with updated functionality. The Google Play Services version of the Places SDK for Android (in Google Play Services 16.0.0) is deprecated as of January 29, 2019, and will be turned off on July 29, 2019."
Add following dependency it will work...
implementation 'com.google.android.libraries.places:places:1.0.0'
For more information you can visit,
https://developers.google.com/places/android-sdk/client-migration
After update my google play service version to last released version, when enable minify in debug or release the following warning shown and task not complete.
Warning:io.nlopez.smartlocation.activity.ActivityStore: can't find referenced method 'DetectedActivity(int,int,int)' in program class com.google.android.gms.location.DetectedActivity
Updated version : compile 'com.google.android.gms:play-services:10.2.0'
I add this line in my gradle apply plugin: 'com.google.gms.google-services'
Can anyone help me ?
I found the issue i use this Library in my project and Google play services version 10.2.0 is incompatible with this library
Try to add Google Play Service location package:
compile 'com.google.android.gms:play-services-location:10.2.0'
Also you should check SmartLocation library description, last compatible version of Google Play Services 10.0.1:
https://github.com/mrmans0n/smart-location-lib
...
Google Play Services compatible version: 10.0.1
So, I think, you should downgrade Grade Google Play service to v. 10.0.1, is you use SmartLocation library
After I Updated gms:play-services-location from 9.0.2 to 9.6.1, I couldn't import com.google.android.gms.location.places.Place and I couldn't use PlaceAutoComplete either.
Was it deprecated or removed from google play service location?
Per the list of split dependencies, to include the places APIs, you must include the dependency
compile 'com.google.android.gms:play-services-places:9.6.1'
The places dependency was only added in Google Play services 9.2.0 - before that, it was part of the maps dependency, which was a requirement for location (version 9.6.0 also removed the dependency of location on maps), hence why previously when you included location you also got places.
add this version in your gradle
compile 'com.google.android.gms:play-services:7.3.0'
I am implementing Google plus login system to my android app by following the tutorial of google developer at https://developers.google.com/identity/sign-in/android/sign-in
According to the tutorial, I should implement:
GoogleApiClient.ServerAuthCodeCallbacks
interface to enable server-side API access for the android app. However, 'ServerAuthCodeCallbacks' interface does not exist in the GoogleApiClient library, even in the latest version of the library.
Does anybody have the same issue? Or, am I missing something?
Any input will be greatly appreciated!
See the example implementation on GitHub: github.com/googleplus/gplus-quickstart-android
Your dependency on com.google.android.gms:play-services must be at least of version 7.0.0 (currently latest is version 7.5.0)
Class itself is currently placed in package com.google.android.gms.common.api in Maven sub-dependency play-services-base
So for example like this:
dependencies {
compile 'com.google.android.gms:play-services:7.5.0'
}
Also see current Developer documentation here:
https://developers.google.com/android/guides/setup#add_google_play_services_to_your_project