Agontuk / react-native-geolocation-service

React native geolocation service for iOS and android
https://www.npmjs.com/package/react-native-geolocation-service
MIT License
1.61k stars 292 forks source link

App crashing after launching on Android due to play services #247

Closed rebirthtobi closed 2 years ago

rebirthtobi commented 3 years ago

I followed the procedure for setup but app crashes everytime,

"react-native": "0.63.3", "react-native-geolocation-service": "^5.2.0",

I tries

googlePlayServicesVersion = "17.0.0" playServicesVersion = "17.0.0" playServicesLocationVersion = "17.0.0"

But none worked.

Error is this;

2021-03-03 00:27:36.652 25592-25592/com.reactnativebase.dev E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.reactnativebase.dev, PID: 25592
    java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/zzbq;
        at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source:2)
        at android.app.ActivityThread.installProvider(ActivityThread.java:7211)
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:6694)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6589)
        at android.app.ActivityThread.access$1400(ActivityThread.java:227)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1890)
        at android.os.Handler.dispatchMessage(Handler.java:107)
        at android.os.Looper.loop(Looper.java:224)
        at android.app.ActivityThread.main(ActivityThread.java:7590)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.internal.zzbq" on path: DexPathList[[zip file "/data/app/com.reactnativebase

Dependencies

def multidex_version = "2.0.1"
    implementation 'androidx.multidex:multidex:2.0.1'
    implementation fileTree(dir: "libs", include: ["*.jar"])
    //noinspection GradleDynamicVersion
    implementation "com.facebook.react:react-native:+"  // From node_modules

    implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
    debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.fbjni'
    }
    debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.flipper'
        exclude group:'com.squareup.okhttp3', module:'okhttp'
    }
    debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.flipper'
    }

    if (enableHermes) {
        def hermesPath = "../../node_modules/hermes-engine/android/";
        debugImplementation files(hermesPath + "hermes-debug.aar")
        releaseImplementation files(hermesPath + "hermes-release.aar")
    } else {
        implementation jscFlavor
    }
GuleriaAshish commented 3 years ago

Have you found any solution??

Agontuk commented 3 years ago

You're using other play service libraries which have different versions than this. Make sure all play service libraries are using same version.

Agontuk commented 2 years ago

Closing due to inactivity