mapbox / mapbox-gl-native-android

Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL
https://mapbox.com/mobile
Other
218 stars 114 forks source link

Crash when using android.uid.system #738

Open RoProducts opened 2 years ago

RoProducts commented 2 years ago

Hi,

we want to use the Mapbox Android Maps SDK in a custom Android image as a system app using android:sharedUserId="android.uid.system"

Environment

Observed behavior and steps to reproduce

We would expect the SDK to work, but when using the above mentioned flag the app crashes :

2022-02-16 05:14:50.660 30100-30100/ch.jespr.jespr E/ACRA: ACRA caught a RuntimeException for ch.jespr.jespr java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: androidx.startup.StartupException: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/priv-app/Jespr/Jespr.apk"],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]]] couldn't find "libmapbox-common.so" [...] Calling a method in the system process without a qualified user: android.app.ContextImpl.bindService:1763 android.content.ContextWrapper.bindService:539 com.mapbox.android.telemetry.provider.MapboxTelemetryInitProvider.onCreate:69

Is this a known issue. May an update to SDK v10 help? Thank you