-
Notifications
You must be signed in to change notification settings - Fork 63
Description
When running Java.Interop-Tests on NativeAOT in dotnet/android (PR dotnet/android#10496), the JNI method remapping tests fail because NativeAOT does not have _monodroid_lookup_replacement_method_info / _monodroid_lookup_replacement_type native functions, and we do not plan to implement them.
These 4 tests should be marked with [Category("NativeAOTIgnore")] so they are excluded when $(PublishAot)==true:
JniPeerMembersTests.ReplaceInstanceMethodNameJniPeerMembersTests.ReplaceStaticMethodNameJniPeerMembersTests.ReplaceInstanceMethodWithStaticMethodJniPeerMembersTests.ReplacementTypeUsedForMethodLookup
The dotnet/android test runner already excludes the NativeAOTIgnore category when building with NativeAOT.
All 4 tests fail with Java.Lang.NoSuchMethodError because the method replacement/remapping infrastructure (GetReplacementMethodInfoCore, GetReplacementTypeCore) relies on native functions that are only available on Mono/CoreCLR via AndroidTypeManager, not on NativeAOT via ManagedTypeManager.