NativeAOT Android app crashes with UnsatisfiedLinkError using 10.0.103
- Dominant language
- C#
- Stars
- 2.1k
- Forks
- 579
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 257
Description
### Android framework version
net10.0-android
### Affected platform version
Workload 10.0.103
### Description
Our Android app using NativeAOT crashes on startup when built with workload 10.0.103. The same app builds and runs correctly with workload 10.0.102. No code changes between the two builds.
Stacktrace:
```
Exception java.lang.UnsatisfiedLinkError:
at java.lang.Runtime.loadLibrary0 (Runtime.java:1097)
at java.lang.Runtime.loadLibrary0 (Runtime.java:1019)
at java.lang.System.loadLibrary (System.java:1765)
at net.dot.jni.nativeaot.JavaInteropRuntime. (JavaInteropRuntime.java:8)
at net.dot.jni.nativeaot.NativeAotRuntimeProvider.attachInfo (NativeAotRuntimeProvider.java:38)
at android.app.ActivityThread.installProvider (ActivityThread.java:9021)
at android.app.ActivityThread.installContentProviders (ActivityThread.java:8536)
at android.app.ActivityThread.handleBindApplication (ActivityThread.java:8191)
at android.app.ActivityThread.-$$Nest$mhandleBindApplication (Unknown Source)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2642)
at android.os.Handler.dispatchMessage (Handler.java:107)
at android.os.Looper.loopOnce (Looper.java:282)
at android.os.Looper.loop (Looper.java:387)
at android.app.ActivityThread.main (ActivityThread.java:9500)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:600)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1005)
```
I have only tested our app with this.
I haven't been able to try 11.0.100-preview.1 owing to an issue with [the UseDotNet@2 task and preview sdks](https://github.com/microsoft/azure-pipelines-tasks/issues/18988).
### Steps to Reproduce
I have only tested our app with this.
Project configuration:
```
net10.0-android
Exe
...
...
26.0
android-x64;android-arm64
aab
true
true
true
r8
```
### Did you find any workaround?
Pin maui-android workload to 10.0.102
### Relevant log output
```shell
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.