Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Many Fatal Exception: java.lang.UnsatisfiedLinkError #14428

Closed

Description

@ben-j69

**Android versions:**6.0.1
Device models: Nexus 5X
Mapbox SDK versions:
implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:7.2.0'
implementation 'com.mapbox.mapboxsdk:mapbox-sdk-services:4.5.0'
implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v7:0.5.0'
implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.33.2'
implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.33.2'

I have just added crashlytics to my app and I got this new error from the sdk :
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__)

com.mapbox.mapboxsdk.net.NativeConnectivityListener.initialize (NativeConnectivityListener.java) com.mapbox.mapboxsdk.net.NativeConnectivityListener. (NativeConnectivityListener.java:27) com.mapbox.mapboxsdk.net.ConnectivityReceiver.instance (ConnectivityReceiver.java:43) com.mapbox.mapboxsdk.Mapbox.getInstance (Mapbox.java:60)

I have several crashes each day on my app and it is affecting my user, we need a solution please.

fail

Activity

  1. changed the title [-]Fatal Exception: java.lang.UnsatisfiedLinkError[/-] [+]Many Fatal Exception: java.lang.UnsatisfiedLinkError[/+] on Apr 16, 2019
  2. added
    Android
    on Apr 16, 2019
  3. tobrun commented on Apr 16, 2019

    @tobrun
    Member

    This could potentially come from mismatching dependency versions.
    Below a list of the dependencies that match versions:

    implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:7.3.1'
    implementation 'com.mapbox.mapboxsdk:mapbox-sdk-services:4.6.0'
    implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v7:0.6.0'
    implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.35.0'
    implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.35.0'
    

    Would you be able to test with this setup?

  4. ben-j69 commented on Apr 17, 2019

    @ben-j69
    Author

    I will try it but before to go live it will take 2 weeks

  5. ben-j69 commented on May 2, 2019

    @ben-j69
    Author

    Hello @tobrun

    I use your configuration and now I have this error

    com.getkeepsafe.relinker.ApkLibraryInstaller.installLibrary (ApkLibraryInstaller.java:128) com.getkeepsafe.relinker.ReLinkerInstance.loadLibraryInternal (ReLinkerInstance.java:180) com.getkeepsafe.relinker.ReLinkerInstance.loadLibrary (ReLinkerInstance.java:136) com.getkeepsafe.relinker.ReLinkerInstance.loadLibrary (ReLinkerInstance.java:92) com.mapbox.mapboxsdk.module.loader.LibraryLoaderProviderImpl$ReLinkerLibraryLoader.load (LibraryLoaderProviderImpl.java:38) com.mapbox.mapboxsdk.LibraryLoader.load (LibraryLoader.java:43) com.mapbox.mapboxsdk.net.NativeConnectivityListener. (NativeConnectivityListener.java:1) com.mapbox.mapboxsdk.net.ConnectivityReceiver.instance (ConnectivityReceiver.java:43) com.mapbox.mapboxsdk.Mapbox.getInstance (Mapbox.java:60)

  6. ben-j69 commented on Sep 18, 2019

    @ben-j69
    Author

    Hello I still have this error it is not satisfying at all

  7. tobrun commented on Sep 18, 2019

    @tobrun
    Member

    Are you using any kind of abi split configuration? which packaging format are you using? Are you using any other native libraries yourself or through dependencies? How many percent of users are impacted?

    note that you are able to replace the native library loader by any your own choice with LibraryLoader#setLibraryLoader

  8. ben-j69 commented on Sep 18, 2019

    @ben-j69
    Author

    I don't think I am using any abi split configuration. Do you have more infos ?

    I am using app bundles.

    I have other native libs like bugsnag for example.

    Around 1% of my user have this error, this is the most common error in my app and it is why I really need to fix it.

  9. caovanthanh203 commented on Feb 13, 2020

    @caovanthanh203

    @ben-j69
    Because Mapbox only has 4 lib folder is:

    "armeabi-v7a", "arm64-v8a", "x86", "x86_64"

    You can see in APK analyze:
    https://i.ibb.co/zXyjwjD/Screenshot-from-2020-02-14-00-31-08.pngScreenshot from 2020-02-14 00-31-08

    But some device will find Mapbox class in wrong path, example it find in folder "armeabi", because this folder not exists so UnsatisfiedLinkError will be throw.

    Have to solve?
    You have to tell to device that it should find Mapbox lib in there folders:

    "armeabi-v7a", "arm64-v8a", "x86", "x86_64"

    by add filter to build.gradle in app module:

    defaultConfig {
           ...
           ndk {
               abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
           }
    }
    

    in some case you also have to add this line to file gradle.propertise :

    android.useDeprecatedNdk=true

    Notes: I see that some device x86 only run well when set to:

    ndk {
    abiFilters "x86"
    }

    so I think we should built multi apk abi

  10. ben-j69 commented on Feb 26, 2020

    @ben-j69
    Author

    On circle CI, updating from mapbox 8.4.0 to version 9.0.0 I had to add

    ndk { abiFilters "x86" }

    to make it work, thanks.

  11. GrEg00z commented on Jan 26, 2021

    @GrEg00z

    I confirm the solution given by @bc67da8d works with this config :
    implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:6.1.3'

    Only needed to add in app.gradle :

    ndk {
          abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
      }
    

    My source code is from Nativescript app, with the following conf :

    • Nativescript : 6.2.2
    • tns-core-modules : 6.1.0
    • tns-android : 6.2.0
  12. Lizzergas commented on Oct 13, 2022

    @Lizzergas

    I am getting the same error with implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:9.0.0'

    No additional dependencies are used for mapbox.

    Previous version worked on 8.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Androidneeds information

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions