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

App Crashing after integrating geolocation #10

Closed
mortenboye opened this issue Apr 20, 2018 · 5 comments
Closed

App Crashing after integrating geolocation #10

mortenboye opened this issue Apr 20, 2018 · 5 comments

Comments

@mortenboye
Copy link

I'm experiencing and issue where my app can no longer launch after integrating the geolocation plugin.

I'm seeing the following error:

04-20 10:38:07.162 28097-28097/greensensor.com.greensensor E/AndroidRuntime: FATAL EXCEPTION: main
Process: greensensor.com.greensensor, PID: 28097
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/api/Api$zzf;
at com.google.android.gms.location.LocationServices.(Unknown Source:0)
at com.google.android.gms.location.LocationServices.getFusedLocationProviderClient(Unknown Source:0)
at io.intheloup.geolocation.location.LocationClient.(LocationClient.kt:40)
at io.intheloup.geolocation.GeolocationPlugin.(GeolocationPlugin.kt:14)
at io.intheloup.geolocation.GeolocationPlugin$Companion.registerWith(GeolocationPlugin.kt:57)
at io.intheloup.geolocation.GeolocationPlugin.registerWith(Unknown Source:2)
at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:29)
at greensensor.com.greensensor.MainActivity.onCreate(MainActivity.java:12)
at android.app.Activity.performCreate(Activity.java:6975)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1213)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2770)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.api.Api$zzf" on path: DexPathList[[zip file "/data/app/greensensor.com.greensensor-GIph4HLdX8jz_m5c7vM3jQ==/base.apk"],nativeLibraryDirectories=[/data/app/greensensor.com.greensensor-GIph4HLdX8jz_m5c7vM3jQ==/lib/arm64, /system/fake-libs64, /data/app/greensensor.com.greensensor-GIph4HLdX8jz_m5c7vM3jQ==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
...
...

considering the Dex comment in that log, i'm suspecting a Play Services versioning issue, but i'm not sure how to fix that

@mortenboye
Copy link
Author

mortenboye commented Apr 20, 2018

Similar to #4 it seems, even when using geolocation v0.2.1.

However, the suggested workaround in #4 seems to solve it, at least the app can now launch

@edufolly
Copy link

I have the same problem with v0.2.1.

It's a conflict with any other plugin that use com.google.android.gms, in my case play-services-vision:15.0.0 from Flutter Mobile Vision

The workaround in #4 works for me with a little diference:

configurations.all {
    resolutionStrategy {
        eachDependency { details ->
            if (details.requested.group == 'com.google.android.gms') {
                details.useVersion "15.0.0"
            }
        }
    }
}

@acrozes
Copy link

acrozes commented May 25, 2018

I solve this issue adding at the end of the file app\build.gradle

configurations.all {
    resolutionStrategy {
        force 'com.google.android.gms:play-services-location:15.0.0'
    }
}

@acrozes
Copy link

acrozes commented May 25, 2018

The pull #16 fix this issue also

@lukaspili
Copy link
Contributor

Sorry for the delay. It's fixed in the latest release 1.0.0.

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

4 participants