System.DllNotFoundException:java-互操作

System.DllNotFoundException: java-interop

我卸载了 Xamarin Studio(因为 xamarin 是免费的)并尝试 运行 我在 VS 上的应用程序,但我收到了这个错误:

System.DllNotFoundException: java-interop

我不知道如何解决这个问题,已经在 Internet 上搜索过,但一无所获。

这是日志

    Loaded assembly: /storage/emulated/0/Android/data/MaoNaRoda.Droid/files/.__override__/System.Xml.XmlSerializer.dll
Loaded assembly: /storage/emulated/0/Android/data/MaoNaRoda.Droid/files/.__override__/System.ServiceModel.Internals.dll [External]
Loaded assembly: /storage/emulated/0/Android/data/MaoNaRoda.Droid/files/.__override__/Mono.Android.dll
Loaded assembly: /storage/emulated/0/Android/data/MaoNaRoda.Droid/files/.__override__/Java.Interop.dll [External]
03-31 15:12:06.457 D/Mono    ( 2254): Assembly Ref addref Java.Interop[0x9e01f9a0] -> System.Collections.Concurrent[0xb43f0700]: 2
03-31 15:12:06.457 D/Mono    ( 2254): Assembly Ref addref System.Collections.Concurrent[0xb43f0700] -> mscorlib[0xb4250dc0]: 4
03-31 15:12:06.457 D/Mono    ( 2254): Assembly Ref addref Java.Interop[0x9e01f9a0] -> System.Reflection[0xb43fc700]: 2
03-31 15:12:06.457 D/Mono    ( 2254): Assembly Ref addref System.Reflection[0xb43fc700] -> mscorlib[0xb4250dc0]: 5
03-31 15:12:06.469 D/Mono    ( 2254): Assembly Ref addref Java.Interop[0x9e01f9a0] -> System.Threading[0x9e01f280]: 2
03-31 15:12:06.469 D/Mono    ( 2254): Assembly Ref addref System.Threading[0x9e01f280] -> mscorlib[0xb4250dc0]: 6
03-31 15:12:06.470 D/Mono    ( 2254): Assembly Ref addref Java.Interop[0x9e01f9a0] -> System.Diagnostics.Debug[0xb43f0a60]: 2
03-31 15:12:06.470 D/Mono    ( 2254): Assembly Loader probing location: '/storage/emulated/0/Android/data/MaoNaRoda.Droid/files/.__override__/System.dll'.
03-31 15:12:06.470 D/Mono    ( 2254): Image addref System[0x9e01fbe0] -> /storage/emulated/0/Android/data/MaoNaRoda.Droid/files/.__override__/System.dll[0x9e023500]: 2
03-31 15:12:06.470 D/Mono    ( 2254): Assembly System[0x9e01fbe0] added to domain RootDomain, ref_count=1
03-31 15:12:06.470 D/Mono    ( 2254): AOT module '/storage/emulated/0/Android/data/MaoNaRoda.Droid/files/.__override__/System.dll.so' not found: dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86/libaot-System.dll.so" not found
03-31 15:12:06.470 D/Mono    ( 2254): AOT module '/Users/builder/data/lanes/3053/a94a03b5/source/monodroid/builds/install/mono-x86/lib/mono/aot-cache/x86/System.dll.so' not found: dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86/libaot-System.dll.so" not found
03-31 15:12:06.470 D/Mono    ( 2254): Assembly Loader loaded assembly from location: '/storage/emulated/0/Android/data/MaoNaRoda.Droid/files/.__override__/System.dll'.
03-31 15:12:06.470 D/Mono    ( 2254): Config attempting to parse: '/storage/emulated/0/Android/data/MaoNaRoda.Droid/files/.__override__/System.dll.config'.
03-31 15:12:06.470 D/Mono    ( 2254): Config attempting to parse: '/Users/builder/data/lanes/3053/a94a03b5/source/monodroid/builds/install/mono-x86/etc/mono/assemblies/System/System.config'.
03-31 15:12:06.470 D/Mono    ( 2254): Assembly Ref addref System.Diagnostics.Debug[0xb43f0a60] -> System[0x9e01fbe0]: 2
03-31 15:12:06.470 D/Mono    ( 2254): Assembly Ref addref System[0x9e01fbe0] -> mscorlib[0xb4250dc0]: 7
Loaded assembly: /storage/emulated/0/Android/data/MaoNaRoda.Droid/files/.__override__/System.dll
03-31 15:12:06.475 D/Mono    ( 2254): Assembly Ref addref Java.Interop[0x9e01f9a0] -> System.Runtime.InteropServices[0xb43fcac0]: 2
03-31 15:12:06.475 D/Mono    ( 2254): Assembly Ref addref System.Runtime.InteropServices[0xb43fcac0] -> mscorlib[0xb4250dc0]: 8
03-31 15:12:06.478 D/Mono    ( 2254): DllImport attempting to load: 'java-interop'.
03-31 15:12:06.478 D/Mono    ( 2254): DllImport error loading library '/storage/emulated/0/Android/data/MaoNaRoda.Droid/files/.__override__/libjava-interop': 'dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86//storage/emulated/0/Android/data/MaoNaRoda.Droid/files/.__override__/libjava-interop" not found'.
03-31 15:12:06.478 D/Mono    ( 2254): DllImport error loading library '/storage/emulated/0/Android/data/MaoNaRoda.Droid/files/.__override__/libjava-interop.so': 'dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86//storage/emulated/0/Android/data/MaoNaRoda.Droid/files/.__override__/libjava-interop.so" not found'.
03-31 15:12:06.478 D/Mono    ( 2254): DllImport error loading library '/system/lib/libjava-interop': 'dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86//system/lib/libjava-interop" not found'.
03-31 15:12:06.478 D/Mono    ( 2254): DllImport error loading library '/system/lib/libjava-interop.so': 'dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86//system/lib/libjava-interop.so" not found'.
03-31 15:12:06.478 D/Mono    ( 2254): DllImport error loading library 'libjava-interop': 'dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86/libjava-interop" not found'.
03-31 15:12:06.478 D/Mono    ( 2254): DllImport error loading library 'libjava-interop.so': 'dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86/libjava-interop.so" not found'.
03-31 15:12:06.478 D/Mono    ( 2254): DllImport error loading library 'java-interop': 'dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86/java-interop" not found'.
03-31 15:12:06.478 D/Mono    ( 2254): DllImport error loading library '/storage/emulated/0/Android/data/MaoNaRoda.Droid/files/.__override__/libjava-interop': 'dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86//storage/emulated/0/Android/data/MaoNaRoda.Droid/files/.__override__/libjava-interop" not found'.
03-31 15:12:06.478 D/Mono    ( 2254): DllImport error loading library '/storage/emulated/0/Android/data/MaoNaRoda.Droid/files/.__override__/libjava-interop.so': 'dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86//storage/emulated/0/Android/data/MaoNaRoda.Droid/files/.__override__/libjava-interop.so" not found'.
03-31 15:12:06.479 D/Mono    ( 2254): DllImport error loading library '/system/lib/libjava-interop': 'dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86//system/lib/libjava-interop" not found'.
03-31 15:12:06.479 D/Mono    ( 2254): DllImport error loading library '/system/lib/libjava-interop.so': 'dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86//system/lib/libjava-interop.so" not found'.
03-31 15:12:06.479 D/Mono    ( 2254): DllImport error loading library 'libjava-interop': 'dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86/libjava-interop" not found'.
03-31 15:12:06.479 D/Mono    ( 2254): DllImport error loading library 'libjava-interop.so': 'dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86/libjava-interop.so" not found'.
03-31 15:12:06.479 D/Mono    ( 2254): DllImport error loading library 'libjava-interop': 'dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86/libjava-interop" not found'.
03-31 15:12:06.479 W/Mono    ( 2254): DllImport unable to load library 'dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86/libjava-interop" not found'.
03-31 15:12:06.479 D/Mono    ( 2254): DllImport attempting to load: 'java-interop'.
03-31 15:12:06.479 D/Mono    ( 2254): DllImport error loading library '/storage/emulated/0/Android/data/MaoNaRoda.Droid/files/.__override__/libjava-interop': 'dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86//storage/emulated/0/Android/data/MaoNaRoda.Droid/files/.__override__/libjava-interop" not found'.
03-31 15:12:06.479 D/Mono    ( 2254): DllImport error loading library '/storage/emulated/0/Android/data/MaoNaRoda.Droid/files/.__override__/libjava-interop.so': 'dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86//storage/emulated/0/Android/data/MaoNaRoda.Droid/files/.__override__/libjava-interop.so" not found'.
03-31 15:12:06.479 D/Mono    ( 2254): DllImport error loading library '/system/lib/libjava-interop': 'dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86//system/lib/libjava-interop" not found'.
03-31 15:12:06.479 D/Mono    ( 2254): DllImport error loading library '/system/lib/libjava-interop.so': 'dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86//system/lib/libjava-interop.so" not found'.
03-31 15:12:06.479 D/Mono    ( 2254): DllImport error loading library 'libjava-interop': 'dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86/libjava-interop" not found'.
03-31 15:12:06.479 D/Mono    ( 2254): DllImport error loading library 'libjava-interop.so': 'dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86/libjava-interop.so" not found'.
03-31 15:12:06.479 D/Mono    ( 2254): DllImport error loading library 'java-interop': 'dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86/java-interop" not found'.
03-31 15:12:06.479 D/Mono    ( 2254): DllImport error loading library '/storage/emulated/0/Android/data/MaoNaRoda.Droid/files/.__override__/libjava-interop': 'dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86//storage/emulated/0/Android/data/MaoNaRoda.Droid/files/.__override__/libjava-interop" not found'.
03-31 15:12:06.479 D/Mono    ( 2254): DllImport error loading library '/storage/emulated/0/Android/data/MaoNaRoda.Droid/files/.__override__/libjava-interop.so': 'dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86//storage/emulated/0/Android/data/MaoNaRoda.Droid/files/.__override__/libjava-interop.so" not found'.
03-31 15:12:06.481 D/Mono    ( 2254): DllImport error loading library '/system/lib/libjava-interop': 'dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86//system/lib/libjava-interop" not found'.
03-31 15:12:06.481 D/Mono    ( 2254): DllImport error loading library '/system/lib/libjava-interop.so': 'dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86//system/lib/libjava-interop.so" not found'.
03-31 15:12:06.481 D/Mono    ( 2254): DllImport error loading library 'libjava-interop': 'dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86/libjava-interop" not found'.
03-31 15:12:06.482 D/Mono    ( 2254): DllImport error loading library 'libjava-interop.so': 'dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86/libjava-interop.so" not found'.
03-31 15:12:06.482 D/Mono    ( 2254): DllImport error loading library 'libjava-interop': 'dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86/libjava-interop" not found'.
03-31 15:12:06.482 W/Mono    ( 2254): DllImport unable to load library 'dlopen failed: library "/data/app/MaoNaRoda.Droid-1/lib/x86/libjava-interop" not found'.
Unhandled Exception:

System.DllNotFoundException: java-interop

更多详情

03-31 16:23:23.607 E/mono    ( 2743): 
03-31 16:23:23.607 E/mono    ( 2743): Unhandled Exception:
03-31 16:23:23.607 E/mono    ( 2743): System.DllNotFoundException: java-interop
03-31 16:23:23.607 E/mono    ( 2743):   at (wrapper managed-to-native) Java.Interop.NativeMethods:java_interop_jnienv_get_java_vm (intptr,intptr&)
03-31 16:23:23.607 E/mono    ( 2743):   at Java.Interop.JniEnvironment+References.GetJavaVM (IntPtr jnienv, System.IntPtr& vm) [0x00003] in /Users/builder/data/lanes/2923/a908ff16/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.cs:163 
03-31 16:23:23.607 E/mono    ( 2743):   at Java.Interop.JniEnvironmentInfo.set_EnvironmentPointer (IntPtr value) [0x0002e] in /Users/builder/data/lanes/2923/a908ff16/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.cs:190 
03-31 16:23:23.607 E/mono    ( 2743):   at Java.Interop.JniEnvironmentInfo..ctor (IntPtr environmentPointer, Java.Interop.JniRuntime runtime) [0x00009] in /Users/builder/data/lanes/2923/a908ff16/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.cs:215 
03-31 16:23:23.607 E/mono    ( 2743):   at Java.Interop.JniRuntime..ctor (Java.Interop.CreationOptions options) [0x00105] in /Users/builder/data/lanes/2923/a908ff16/source/Java.Interop/src/Java.Interop/Java.Interop/JniRuntime.cs:192 
03-31 16:23:23.607 E/mono    ( 2743):   at Android.Runtime.AndroidRuntime..ctor (IntPtr jnienv, IntPtr vm, Boolean allocNewObjectSupported, IntPtr classLoader, IntPtr classLoader_loadClass) [0x00000] in /Users/builder/data/lanes/2923/a908ff16/source/monodroid/src/Mono.Android/src/Runtime/AndroidRuntime.cs:17 
03-31 16:23:23.607 E/mono    ( 2743):   at Android.Runtime.JNIEnv.Initialize (Android.Runtime.JnienvInitializeArgs* args) [0x00168] in /Users/builder/data/lanes/2923/a908ff16/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.cs:237 
03-31 16:23:23.607 E/mono-rt ( 2743): [ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: java-interop
03-31 16:23:23.607 E/mono-rt ( 2743):   at (wrapper managed-to-native) Java.Interop.NativeMethods:java_interop_jnienv_get_java_vm (intptr,intptr&)
03-31 16:23:23.607 E/mono-rt ( 2743):   at Java.Interop.JniEnvironment+References.GetJavaVM (IntPtr jnienv, System.IntPtr& vm) [0x00003] in /Users/builder/data/lanes/2923/a908ff16/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.cs:163 
03-31 16:23:23.607 E/mono-rt ( 2743):   at Java.Interop.JniEnvironmentInfo.set_EnvironmentPointer (IntPtr value) [0x0002e] in /Users/builder/data/lanes/2923/a908ff16/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.cs:190 
03-31 16:23:23.607 E/mono-rt ( 2743):   at Java.Interop.JniEnvironmentInfo..ctor (IntPtr environmentPointer, Java.Interop.JniRuntime runtime) [0x00009] in /Users/builder/data/lanes/2923/a908ff16/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.cs:215 
03-31 16:23:23.607 E/mono-rt ( 2743):   at Java.Interop.JniRuntime..ctor (Java.Interop.CreationOptions options) [0x00105] in /Users/builder/data/lanes/2923/a908ff16/source/Java.Interop/src/Java.Interop/Java.Interop/JniRuntime.cs:192 
03-31 16:23:23.607 E/mono-rt ( 2743):   at Android.Runtime.AndroidRuntime..ctor (IntPtr jnienv, IntPtr vm, Boolean allocNewObjectSupported, IntPtr classLoader, IntPtr classLoader_loadClass) [0x00000] in /Users/builder/data/lanes/2923/a908ff16/source/monodroid/src/Mono.Android/src/Runtime/AndroidRuntime.cs:17 
03-31 16:23:23.607 E/mono-rt ( 2743):   at Android.Runtime.JNIEnv.Initialize (Android.Runtime.JnienvInitializeArgs* args) [0x00168] in /Users/builder/data/lanes/2923/a908ff16/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.cs:237 

感谢您提交相应的错误报告:https://bugzilla.xamarin.com/show_bug.cgi?id=40031。也感谢您对该错误的后续评论,您提到您可以通过以下方式解决问题:

  1. 正在从设备上卸载旧版本的应用程序。
  2. 正在将新版本的应用程序重新部署到设备。

听起来这些步骤应该可以解决其他可能遇到此问题的人的问题。

(附带说明,即将修复另一个相关错误,其中 "stale" 设备上的文件导致错误。我认为该修复有望在未来帮助防止此类问题。 )