mapkit-android-demo
mapkit-android-demo copied to clipboard
Fatal Exception: java.lang.UnsatisfiedLinkError
Hi. We experience a crash on some devices due to absent corresponding .so library. Full logs:
Fatal Exception: java.lang.UnsatisfiedLinkError: Couldn't load maps-mobile, reason: lib/armeabi/libmaps-mobile.so at com.yandex.runtime.Runtime.loadLibrary(Runtime.java:123) at com.yandex.runtime.Runtime.init(Runtime.java:96) at com.yandex.runtime.Runtime.init(Runtime.java:103) at com.yandex.mapkit.MapKitFactory.initialize(MapKitFactory.java:25) at com.yandex.mapkit.search.SearchFactory.initialize(SearchFactory.java:12) at com.example.app.initializer.ProcessDependentInitializer.setUpYandexMapKit(ProcessDependentInitializer.java:125) at com.example.app.initializer.ProcessDependentInitializer.initializeProcessDependentComponents(ProcessDependentInitializer.java:65) at com.example.app.initializer.ProcessDependentInitializer.initialize(ProcessDependentInitializer.java:50) at com.example.app.MApplication.onCreate(MApplication.java:67) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1019) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4980) at android.app.ActivityThread.-wrap1(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1562) at android.os.Handler.dispatchMessage(Handler.java:111) at android.os.Looper.loop(Looper.java:207) at android.app.ActivityThread.main(ActivityThread.java:5811) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:802) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:692)
Libs versions:
mapkit : "com.yandex.android:maps.mobile:4.0.0-full",
search : "com.yandex.android:search:3.5.0",
oauth : "com.yandex.android:authsdk:2.0.0"
Firebase crash statistics of devices:

How we can fix it or just wait future library update?
@eberkovich Hi. Any response?)
@eberkovich Soft reminder, some users can't start our app. Maybe I need to add more info about the crash?
lib/armeabi/libmaps-mobile.so is an armv7 (32-bit) version of library. Did you include this arch and corresponding version of lib in your app?
Galaxy A5 is an armv7 device.
@TheMrButcher We deploy the bundle on google play. But if build debug apk, there no .so library by this path (lib/armeabi/libmaps-mobile.so):
Also, we don't have some special configuration for splitting and filtering ABI in Gradle configs
@TheMrButcher Hi. Some updates about this bug? )
"we don't have some special configuration for splitting and filtering ABI in Gradle configs" May be that is the problem. Please can you manually specify these 4 archs in abiFilters?
@TheMrButcher
I've analyzed apk, which user with problematic device receives from google play and there found this library:
It means that the user already have the correct ABI lib, but despite this crash happens. I can send a list of devices on which the crash occurs. May be it can help reproduce this crash.
AFAIK armeabi and armeabi-v7a are not the same. We do not compile MapKit for armeabi, only for armeabi-v7a. I think that on some devices ReLinker tries to load armeabi version because abi filters are not specified and all archs are allowed.
@TheMrButcher And how to solve this issue? Can you compile armeabi version?
I've encountered this issue too. Most crashes on:
- Android 7, Android 8
- ONEPLUS A5000, SAMSUNG A5, SAMSUNG A3, HUAWEI Y3III
We create bundles for Google Play, and APKs for AppGallery. Version com.yandex.android:maps.mobile:4.0.0-lite
Any updates on the issue? @TheMrButcher
We have the same issue for 4.0.0-full most commonly on Huawei and Samsung devices (Android 7, 8, 9) Any updates on the issue? @TheMrButcher
Seeing this crash in our app using 4.1.0-full version
Here's a list of devices and their OS versions that got this crash in the recent couple of months, hope that's useful
Also seeing this crash in our app using com.yandex.android:maps.mobile:4.2.1-lite
.
We use App Bundle
for our app distribution. Our setup for it in convention plugin is:
import com.android.build.gradle.BaseExtension
@Suppress("UnstableApiUsage")
fun BaseAppModuleExtension.setupAppBundle() {
bundle {
language {
enableSplit = true
}
density {
enableSplit = true
}
abi {
enableSplit = true
}
}
}
Don't sure why (we are kinda a desperate people about this crash 😔) but we add also the following block into defaultConfig
:
import com.android.build.gradle.internal.dsl.BaseAppModuleExtension
@Suppress("UnstableApiUsage")
fun BaseAppModuleExtension.setupSupportedAbi() {
defaultConfig {
ndk {
abiFilters.addAll(
listOf(
"arm64-v8a",
"armeabi-v7a",
"x86",
"x86_64"
)
)
}
}
}
Anyway, we have a lot of crashes among our users, with different devices and different ABI. Hope this information help:
Model | OS version | Supported ABI |
---|---|---|
Aosp On IA Emulator | 7.0 | x86, armeabi-v7a, armeabi |
Nexus 5X | 8.1.0 | x86 |
Nexus 5X | 6.0.1 | armeabi-v7a, armeabi, x86 |
真我 GT NEO 3 | 13 | arm64-v8a, armeabi-v7a, armeabi |
Redmi Note 9S | 12 | arm64-v8a, armeabi-v7a, armeabi |
Poco F3 | 13 | arm64-v8a, armeabi-v7a, armeabi |
V2061 | 12 | arm64-v8a, armeabi-v7a, armeabi |
How do we get supported ABI list:
import android.os.Build
import android.content.Context
@Suppress("DEPRECATION")
fun Context.getSupportedAbis(): Array<String> {
return when {
Build.SUPPORTED_ABIS.isNotEmpty() -> Build.SUPPORTED_ABIS
Build.CPU_ABI2.isNotEmpty() -> arrayOf(Build.CPU_ABI, Build.CPU_ABI2)
else -> arrayOf(Build.CPU_ABI)
}
}
Also some information without ABI info (we did not think to collect this information from the beggining):
- Affected models:
- Samsungs
- Galaxy J6+
- Galaxy S22
- Galaxy A51
- Galaxy A8+(2018)
- Galaxy S20 Ultra 5G
- Galaxy M12
- Galaxy A53 5G
- Galaxy M31s
- Xiaomi
- Redmi 9T
- Redmi 7
- Redmi 9A
- Redmi Note 10S
- Redmi Note 10 Pro
- Redmi 10 2022
- Poco X3 Pro
- Redmi Note 9S
- Honor
- Honor 50
- Honor X8
- Honor 50 Lite
- Honor 70
- Honor X8a
- Oppo
- Realme C35
- RMX3231
- Realme 9
- Realme 10
- Realme 6Pro
- Realme XT
- Samsungs
- Affected OS versions:
- Android 6 --> Android 13 (all supported versions of our app)
- Devices states: foreground 99%
Hope this could help you anyhow.
May be you have some assumptions, where should we dig more information about this crash, how to fix it?
There is still same issue on com.yandex.android:maps.mobile:4.4.0-lite
Devices affected:
- Oppo Realme RMX3771
- OnePlus 8 PRO
Tried different solutions, but none of them helped.
If you can, send us a minimal compiled example, that demonstrates the situation. It can be uploaded on GitHub, attached to mail as an archive, or uploaded to Yandex Disk and sent to us via link.
We will try to find a solution.
Hi all, same problem, affects android 13 and 14. Using aab. Lib ver - 4.0.0-full Devices:
- Samsung Galaxy S21 5G
- Samsung Galaxy A54 5G
- Poco X5
- Xiaomi Redmi 12 5G
We still need a minimal example of the application code, which we can assemble to reproduce the situation in our environment.
same issue from me com.yandex.android:maps.mobile:4.4.0-lite
Devices affected: Xiaomi 11T android14
We need a minimal sample code that we can assemble to reproduce the situation in our environment. It can be uploaded to GitHub or any other file sharing service.
Здравствуйте! Такая ошибка присутствует на 4.6.1-full потому что вы убрали
SearchFactory.initialize(this)
я снизил версия библиотеки до 4.4.0-full и все работает. Думаю вы не инициализируете SearchFactory и убрали возможность вручную инициализировать
Здравствуйте, @Kratos1013!
Нам очень поможет свежий пример проекта, который позволит наглядно воспроизвести ошибку. Пожалуйста, оформите его и загрузите на любой удобный файлообменник. В том числе можно загрузить проект в GitHub и прислать на него ссылку.