Xamarin.Android支持Andoid 4.0(API 14)及以上版本

时间:2017-12-26 21:27:54

标签: android xamarin xamarin.android

我在Windows 10上使用visual studio enterprise 2017.android演示应用程序似乎在 Android 7.1(API 27)模拟器 上运行良好。但是,当我使用 4.4 Android(API 19)模拟器 运行应用程序时,它会在出现以下错误后立即失败:

Android application is debugging.
Could not connect to the debugger.
12-26 19:37:00.890 D/dalvikvm( 1918): Late-enabling CheckJNI
12-26 19:37:00.922 D/dalvikvm( 1918): Trying to load lib /data/app-lib/App5.App5-2/libmonodroid.so 0xa8f90fc0
12-26 19:37:00.922 D/dalvikvm( 1918): Added shared lib /data/app-lib/App5.App5-2/libmonodroid.so 0xa8f90fc0
12-26 19:37:00.934 W/monodroid( 1918): Creating public update directory: `/data/data/App5.App5/files/.__override__`
12-26 19:37:00.934 W/monodroid( 1918): Using override path: /data/data/App5.App5/files/.__override__
12-26 19:37:00.934 W/monodroid( 1918): Using override path: /storage/emulated/0/Android/data/App5.App5/files/.__override__
12-26 19:37:00.934 W/monodroid( 1918): Using override path: /storage/emulated/0/../legacy/Android/data/App5.App5/files/.__override__
12-26 19:37:00.934 W/monodroid( 1918): Trying to load sgen from: /data/data/App5.App5/files/.__override__/libmonosgen-2.0.so
12-26 19:37:00.934 W/monodroid( 1918): Trying to load sgen from: /storage/emulated/0/Android/data/App5.App5/files/.__override__/libmonosgen-2.0.so
12-26 19:37:00.934 W/monodroid( 1918): Trying to load sgen from: /storage/emulated/0/../legacy/Android/data/App5.App5/files/.__override__/libmonosgen-2.0.so
12-26 19:37:00.938 W/monodroid( 1918): Trying to load sgen from: /data/app-lib/App5.App5-2/libmonosgen-2.0.so
12-26 19:37:00.938 W/monodroid( 1918): Trying to load sgen from: /data/data/App5.App5/files/.__override__/links/libmonosgen-2.0.so
12-26 19:37:00.938 W/monodroid-debug( 1918): Trying to initialize the debugger with options: --debugger-agent=transport=dt_socket,loglevel=0,address=127.0.0.1:29360,server=y,embedding=1
12-26 19:37:01.102 W/monodroid-debug( 1918): Accepted stdout connection: 43
12-26 19:37:01.870 D/Mono    ( 1918): Image addref mscorlib[0xb8989ef0] -> mscorlib.dll[0xb8989160]: 2
12-26 19:37:01.870 D/Mono    ( 1918): Prepared to set up assembly 'mscorlib' (mscorlib.dll)
12-26 19:37:01.874 D/Mono    ( 1918): AOT: image 'mscorlib.dll.so' not found: dlopen failed: library "/data/app-lib/App5.App5-2/libaot-mscorlib.dll.so" not found
12-26 19:37:01.874 D/Mono    ( 1918): AOT: image '/usr/local/lib/mono/aot-cache/x86/mscorlib.dll.so' not found: dlopen failed: library "/data/app-lib/App5.App5-2/libaot-mscorlib.dll.so" not found
12-26 19:37:01.874 D/Mono    ( 1918): Config attempting to parse: 'mscorlib.dll.config'.
12-26 19:37:01.874 D/Mono    ( 1918): Config attempting to parse: '/usr/local/etc/mono/assemblies/mscorlib/mscorlib.config'.
12-26 19:37:01.890 D/Mono    ( 1918): Assembly mscorlib[0xb8989ef0] added to domain RootDomain, ref_count=1

最小目标设置为c4.0。因为即使Xamarin.Android.Support.v4需要MonoAndroid 8.0这一事实感到困惑,我甚至不知道从哪里开始...但是,我已经在target version {{1}周围互换/切换了并且minimum version没有运气。定位 Android 4.0(API 14) 甚至更糟糕,因为该应用无法构建... The following is the Github code of the working app with minimum version set as Android 4.0, target set as Android 8.0, and compiled with Android 8.0, and running on Android 7.1 emulator

如何在Android 4.4模拟器上使应用程序支持Android 4.0(API 14)而不出错?