maps icon indicating copy to clipboard operation
maps copied to clipboard

[Android] No implementation found for void com.mapbox.mapboxsdk.net.NativeConnectivityListener.initialize()

Open kelcon opened this issue 7 years ago • 3 comments

Describe the bug Android App crashes during start.

To Reproduce

react-native run-android --variant=release
react-native run-android --variant=debug

Screenshots

09-01 12:10:45.061 30074 30139 D SoLoader: About to load: libmapbox-gl.so
09-01 12:10:45.061 30074 30139 D SoLoader: libmapbox-gl.so not found on /data/data/com.magentaflying/lib-main
09-01 12:10:45.061 30074 30139 D SoLoader: libmapbox-gl.so found on /data/app/com.magentaflying-2/lib/arm
09-01 12:10:45.061 30074 30139 D SoLoader: Not resolving dependencies for libmapbox-gl.so
09-01 12:10:45.061 30074 30074 E art     : No implementation found for void com.mapbox.mapboxsdk.net.NativeConnectivityListener.initialize() (tried Java_com_mapbox_mapboxsdk_net_NativeConnectivityListener_initialize and Java_com_mapbox_mapboxsdk_net_NativeConnectivityListener_initialize__)
09-01 12:10:45.061 30074 30074 D AndroidRuntime: Shutting down VM
09-01 12:10:45.061 30074 30074 E AndroidRuntime: FATAL EXCEPTION: main
09-01 12:10:45.061 30074 30074 E AndroidRuntime: Process: com.magentaflying, PID: 30074
09-01 12:10:45.061 30074 30074 E AndroidRuntime: java.lang.UnsatisfiedLinkError: No implementation found for void com.mapbox.mapboxsdk.net.NativeConnectivityListener.initialize() (tried Java_com_mapbox_mapboxsdk_net_NativeConnectivityListener_initialize and Java_com_mapbox_mapboxsdk_net_NativeConnectivityListener_initialize__)
09-01 12:10:45.061 30074 30074 E AndroidRuntime: 	at com.mapbox.mapboxsdk.net.NativeConnectivityListener.initialize(Native Method)
09-01 12:10:45.061 30074 30074 E AndroidRuntime: 	at com.mapbox.mapboxsdk.net.NativeConnectivityListener.<init>(NativeConnectivityListener.java:27)
09-01 12:10:45.061 30074 30074 E AndroidRuntime: 	at com.mapbox.mapboxsdk.net.ConnectivityReceiver.instance(ConnectivityReceiver.java:43)
09-01 12:10:45.061 30074 30074 E AndroidRuntime: 	at com.mapbox.mapboxsdk.Mapbox.getInstance(Mapbox.java:64)
09-01 12:10:45.061 30074 30074 E AndroidRuntime: 	at com.mapbox.rctmgl.modules.RCTMGLModule$1.run(RCTMGLModule.java:292)
09-01 12:10:45.061 30074 30074 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:739)
09-01 12:10:45.061 30074 30074 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:95)
09-01 12:10:45.061 30074 30074 E AndroidRuntime: 	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
09-01 12:10:45.061 30074 30074 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:158)
09-01 12:10:45.061 30074 30074 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7224)
09-01 12:10:45.061 30074 30074 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
09-01 12:10:45.061 30074 30074 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
09-01 12:10:45.061 30074 30074 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
09-01 12:10:45.071   797  1884 W ActivityManager:   Force finishing activity com.magentaflying/.MainActivity

Versions (please complete the following information):

  • Platfrom: Android
  • Device: Samsung S5
  • SDK Version 28
  • React Native Version 0.60
  • package 7.0.1

Additional context

build.gradle

buildscript {
    ext {
        buildToolsVersion = "28.0.3"
        minSdkVersion = 16
        compileSdkVersion = 28
        targetSdkVersion = 28
        supportLibVersion = "28.0.0"
    }
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath("com.android.tools.build:gradle:3.4.1")

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenLocal()

        google()
        jcenter()
maven { url "https://jitpack.io" }
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url("$rootDir/../node_modules/react-native/android")
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }

    }
}

settings.gradle

rootProject.name = 'MagentaFlying' apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) include ':app'


postinstall
"postinstall": "jetify"

kelcon avatar Sep 01 '19 10:09 kelcon

Make sure you follow the readme, the issue is likely that you haven't installed the native side code properly.

I am not sure if auto linking works in RN60 with this library, so you may have to manually link it yourself.

kristfal avatar Sep 02 '19 08:09 kristfal

~I'm using v7.0.8, and this solved this exact crash for me: https://github.com/mapbox/mapbox-gl-native/issues/14428#issuecomment-585883399~

Nevermind, crashing is still occurring on Android 8.0.0 phones and above.

Beamanator avatar Jun 04 '20 18:06 Beamanator

Vghvxyujcbk6dfv__

davepernito45-netizen avatar Apr 23 '26 17:04 davepernito45-netizen