Class com.google.android.gms.internal.zzbfm extended by class com.google.android.gms.location.ActivityRecognitionResult is inaccessible

1.1k views Asked by At

I'm currently trying to set up an android app called GoNote that I didn't write. The codebase is about a year old and uses React Native. However, there are Android-only and iOS-only dependencies.

I had much trouble just getting the project to sync and build in Android Studio. Now that I am able to compile the app, I run into a fatal error after I click on the start button of the IDE and the Android UI gives me a "GoNote keeps stopping" dialog. I tried different devices (Pixel, Nexux 6, Nexus S) with Oreo and also Nougat with the same result. I don't really know what else to do. The log is humongous and I have a hard time figuring out what's important and what's not.

I noticed the following log in Logcat when I try to tap on the app icon:

04-05 11:16:53.323 6348-6348/com.emberex.GoNote E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.emberex.GoNote, PID: 6348
java.lang.IllegalAccessError: Class com.google.android.gms.internal.zzbfm extended by class com.google.android.gms.location.ActivityRecognitionResult is inaccessible (declaration of 'com.google.android.gms.location.ActivityRecognitionResult' appears in /data/app/com.emberex.GoNote-PMng9irP3-f0hgYFm6Y0IA==/split_lib_dependencies_apk.apk:classes30.dex)
    at com.transistorsoft.rnbackgroundgeolocation.RNBackgroundGeolocationModule.<init>(RNBackgroundGeolocationModule.java:85)
    at com.transistorsoft.rnbackgroundgeolocation.RNBackgroundGeolocation.createNativeModules(RNBackgroundGeolocation.java:19)
    at com.facebook.react.NativeModuleRegistryBuilder.processPackage(NativeModuleRegistryBuilder.java:88)
    at com.facebook.react.ReactInstanceManager.processPackage(ReactInstanceManager.java:950)
    at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:891)
    at com.facebook.react.ReactInstanceManager.access$600(ReactInstanceManager.java:104)
    at com.facebook.react.ReactInstanceManager$ReactContextInitAsyncTask.doInBackground(ReactInstanceManager.java:218)
    at com.facebook.react.ReactInstanceManager$ReactContextInitAsyncTask.doInBackground(ReactInstanceManager.java:197)
    at android.os.AsyncTask$2.call(AsyncTask.java:333)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
    at java.lang.Thread.run(Thread.java:764)
1

There are 1 answers

0
Jacob On

I addeed this in app/build.gradle

 implementation("com.google.android.gms:play-services-location:19.0.1")

now works for me