Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

App bundle and UnsatisfiedLinkError #416

Open
tobrun opened this issue Jun 3, 2020 · 5 comments
Open

App bundle and UnsatisfiedLinkError #416

tobrun opened this issue Jun 3, 2020 · 5 comments
Labels

Comments

@tobrun
Copy link
Member

tobrun commented Jun 3, 2020

We have received a numerous reports related to

java.lang.UnsatisfiedLinkError: No implementation found for void com.mapbox.mapboxsdk.net.NativeConnectivityListener.initialize()

The Mapbox Maps SDK for Android, isn’t the only library facing this issue as the root cause seems related to the App Bundle format that Google introduced in 2018. There are a couple of hypothesis/solutions from equivalent threads of different Android libraries using native code:

Potential solution one:

facebook/react-native#23764 (comment)

android {
    packagingOptions {
        pickFirst '**/armeabi-v7a/libmapbox-gl.so'
        pickFirst '**/x86/libmapbox-gl.so'
        pickFirst '**/arm64-v8a/libmapbox-gl.so'
        pickFirst '**/x86_64/libmapbox-gl.so'
        pickFirst '**/x86/libmapbox-gl.so'
    }
}

Potential solution two:

facebook/react-native#23764 (comment)

Android App Bundle has the native libraries uncompressed. You can add the following configuration to your gradle.properties to revert back to compressing:

android.bundle.enableUncompressedNativeLibs=false

I would love to see if someone from the community can try any of the proposed solutions:

cc @mapbox/maps-android

@JRWilding
Copy link

solution 2 does not work, we see the issue with android.bundle.enableUncompressedNativeLibs = false defined

@almo-ltoeroek
Copy link

+1 this is currently forced to revert using APK which results in much larger app footprint

@tobrun tobrun unpinned this issue Oct 2, 2020
@eygraber
Copy link

eygraber commented Dec 22, 2020

We started seeing this issue after updating to v9.5.0

Before that this crash never occurred. We use an aab.

The crash seems to only be happening on Android 24-26 and on Samsung devices.

We use:

override fun attachBaseContext(base: Context) {
    super.attachBaseContext(base)
    SplitCompat.install(this)
}

in our Application, so the install should have all the pieces it needs to run.

@eygraber
Copy link

eygraber commented Feb 1, 2021

We now see this on all Android versions that we support (24-30) and most popular manufacturers. We call Mapbox.getInstance in an androidx.startup.Initializer (and before that we were calling it from a ContentProvider), and Application.attachBaseContext should be getting run before that, so SplitCompat.install should guarantee that the installation is valid.

The suggested solutions have not helped.

@eygraber
Copy link

Still happening on 9.6.1 although it seems like it only happens when initially uploading the aab to the Play Store. Maybe it's an issue in the device farm that Google uses for testing app updates?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants