Skip to content

MAUI10 Thin binding around Mapbox crash at runtime #10878

@jpritchard-isl

Description

@jpritchard-isl

Android framework version

net10.0-android

Affected platform version

.net 10 - VS2026

Description

Including a binding project in an MAUI Android app. The binding project is on a thin binding kotlin class library that wraps around Mapbox 11.
At runtime the app crashes after the splash screen and the following error is logged.
Previously a .net 8 binding porject around the same kotlin class library did not have this issue.

Attempts to fix:

Steps to Reproduce

  1. Checkout the repo at https://github.com/jpritchard-isl/maui-interop-issues
  2. Insert your Mapbox download and access keys in the Native andoird build.gradles and build the kotlin class libary to an aar.
  3. Copy the built .aar and the downloaded mapbox aars to the JarsAndArrs folder in the binding project
  4. Build and run the app on emulator or physical device (tried x86-64 and Arm architectures)

Did you find any workaround?

No response

Relevant log output

Time	Device Name	Type	PID	Tag	Message
03-03 13:39:59.795	pixel_tablet_-_api_36	Debug	7593	nativeloader	Load /data/app/~~NarFGaFkcZkuLc0c-3ntCg==/com.companyname.demoissueapp-ZPLEHqSlHXLpERIZRPphUA==/lib/x86_64/libmapbox-common.so using class loader ns clns-9 (caller=/data/app/~~NarFGaFkcZkuLc0c-3ntCg==/com.companyname.demoissueapp-ZPLEHqSlHXLpERIZRPphUA==/base.apk!classes3.dex): ok
03-03 13:39:59.925	pixel_tablet_-_api_36	Error	7593	me.demoissueapp	No implementation found for java.lang.String com.mapbox.common.Version.getCommonSDKVersionString() (tried Java_com_mapbox_common_Version_getCommonSDKVersionString and Java_com_mapbox_common_Version_getCommonSDKVersionString__) - is the library loaded, e.g. System.loadLibrary?
03-03 13:39:59.921	pixel_tablet_-_api_36	Info	7593	me.demoissueapp	Thread[1,tid=7593,Native,Thread*=0x70f39758f380,peer=0x738c0f78,"main"] recursive attempt to load library "/data/app/~~NarFGaFkcZkuLc0c-3ntCg==/com.companyname.demoissueapp-ZPLEHqSlHXLpERIZRPphUA==/lib/x86_64/libmapbox-common.so"
03-03 13:39:59.840	pixel_tablet_-_api_36	Info	7593	MapboxInitializer	MapboxInitializer started MapboxSDKCommonInitializerImpl initialization, attempt 1
03-03 13:39:59.837	pixel_tablet_-_api_36	Info	7593	me.demoissueapp	hiddenapi: Accessing hidden method Landroid/app/ActivityThread;->getApplication()Landroid/app/Application; (runtime_flags=0, domain=platform, api=unsupported) from Lcom/mapbox/common/BaseMapboxInitializer$Companion; (domain=app) using reflection: allowed
03-03 13:39:59.837	pixel_tablet_-_api_36	Info	7593	me.demoissueapp	hiddenapi: Accessing hidden method Landroid/app/ActivityThread;->currentActivityThread()Landroid/app/ActivityThread; (runtime_flags=0, domain=platform, api=unsupported) from Lcom/mapbox/common/BaseMapboxInitializer$Companion; (domain=app) using reflection: allowed
03-03 13:39:59.837	pixel_tablet_-_api_36	Warning	7593	MapboxInitializer	Trying to call static BaseMapboxInitializer.init() before running BaseMapboxInitializer.create()! Please make sure that Mapbox SDK is initialized before any APIs are called.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: App RuntimeIssues in `libmonodroid.so`.needs-triageIssues that need to be assigned.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions