Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed resolution of: Lcom/google/android/gms/common/api/Api$zzf #259

Open
farzadi opened this issue Nov 23, 2018 · 6 comments
Open

Failed resolution of: Lcom/google/android/gms/common/api/Api$zzf #259

farzadi opened this issue Nov 23, 2018 · 6 comments

Comments

@farzadi
Copy link

farzadi commented Nov 23, 2018

after adding

classpath 'com.google.gms:google-services:4.0.1'

to the project i get this error

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/api/Api$zzf;
        at com.google.android.gms.location.LocationServices.<clinit>(Unknown Source)
        at io.nlopez.smartlocation.location.providers.LocationGooglePlayServicesProvider.init(LocationGooglePlayServicesProvider.java:79)
        at io.nlopez.smartlocation.location.providers.LocationGooglePlayServicesWithFallbackProvider.init(LocationGooglePlayServicesWithFallbackProvider.java:45)
        at io.nlopez.smartlocation.SmartLocation$LocationControl.<init>(SmartLocation.java:173)
        at io.nlopez.smartlocation.SmartLocation.location(SmartLocation.java:67)
        at io.nlopez.smartlocation.SmartLocation.location(SmartLocation.java:59)
@LeonardoCurvelo
Copy link

Still happening in 3.3.0

@ghost
Copy link

ghost commented Dec 5, 2018

It happening when using the gms services 15 or 16 version
Use 'com.google.android.gms:play-services-maps:11.4.2'

@Mentix
Copy link

Mentix commented Dec 8, 2018

Work for me with this config:

implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'

implementation('io.nlopez.smartlocation:library:3.3.3') {
transitive = false
}

And call SmartLocation instance with:

SmartLocation.with(this).location(LocationGooglePlayServicesProvider())

The problem was resolved when change the location to LocationGooglePlayServiceProvider.
Regards.

@Mentix
Copy link

Mentix commented Dec 8, 2018

after adding

classpath 'com.google.gms:google-services:4.0.1'

to the project i get this error

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/api/Api$zzf;
        at com.google.android.gms.location.LocationServices.<clinit>(Unknown Source)
        at io.nlopez.smartlocation.location.providers.LocationGooglePlayServicesProvider.init(LocationGooglePlayServicesProvider.java:79)
        at io.nlopez.smartlocation.location.providers.LocationGooglePlayServicesWithFallbackProvider.init(LocationGooglePlayServicesWithFallbackProvider.java:45)
        at io.nlopez.smartlocation.SmartLocation$LocationControl.<init>(SmartLocation.java:173)
        at io.nlopez.smartlocation.SmartLocation.location(SmartLocation.java:67)
        at io.nlopez.smartlocation.SmartLocation.location(SmartLocation.java:59)

Hello, You need use google maps? or another google service..

@pavelpoley
Copy link

It happening when using the gms services 15 or 16 version
Use 'com.google.android.gms:play-services-maps:11.4.2'

Are you serious?

@i-khan
Copy link

i-khan commented Jun 8, 2020

Work for me with this config:

implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'

implementation('io.nlopez.smartlocation:library:3.3.3') {
transitive = false
}

And call SmartLocation instance with:

SmartLocation.with(this).location(LocationGooglePlayServicesProvider())

The problem was resolved when change the location to LocationGooglePlayServiceProvider.
Regards.

this solved my issue, i haven't gone through in details yet, how did it fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants