diff --git a/src/Microsoft.Android.Runtime.NativeAOT/Android.Runtime.NativeAOT/JavaInteropRuntime.cs b/src/Microsoft.Android.Runtime.NativeAOT/Android.Runtime.NativeAOT/JavaInteropRuntime.cs index 982f1c5a210..ec136214707 100644 --- a/src/Microsoft.Android.Runtime.NativeAOT/Android.Runtime.NativeAOT/JavaInteropRuntime.cs +++ b/src/Microsoft.Android.Runtime.NativeAOT/Android.Runtime.NativeAOT/JavaInteropRuntime.cs @@ -46,6 +46,7 @@ static void init (IntPtr jnienv, IntPtr klass) UseMarshalMemberBuilder = false, JniGlobalReferenceLogWriter = settings.GrefLog, JniLocalReferenceLogWriter = settings.LrefLog, + JniAddNativeMethodRegistrationAttributePresent = true, }; runtime = options.CreateJreVM (); diff --git a/tests/Mono.Android-Tests/Mono.Android-Tests/Xamarin.Android.RuntimeTests/NUnitInstrumentation.cs b/tests/Mono.Android-Tests/Mono.Android-Tests/Xamarin.Android.RuntimeTests/NUnitInstrumentation.cs index d21b35e4aba..215fde081a9 100644 --- a/tests/Mono.Android-Tests/Mono.Android-Tests/Xamarin.Android.RuntimeTests/NUnitInstrumentation.cs +++ b/tests/Mono.Android-Tests/Mono.Android-Tests/Xamarin.Android.RuntimeTests/NUnitInstrumentation.cs @@ -30,17 +30,12 @@ protected NUnitInstrumentation(IntPtr handle, JniHandleOwnership transfer) protected override IList GetTestAssemblies() { Assembly asm = Assembly.GetExecutingAssembly(); - #if !NATIVEAOT // TODO: Java.Interop-Tests not passing yet Assembly ji = typeof (Java.InteropTests.JavaInterop_Tests_Reference).Assembly; - #endif - return new List() { new TestAssemblyInfo (asm, asm.Location ?? String.Empty), - #if !NATIVEAOT new TestAssemblyInfo (ji, ji.Location ?? String.Empty), - #endif }; } }