我已经使用测试应用程序hello world以及我的应用程序测试了部署,没有任何内容可以部署到我的设备或VM。这是输出。一旦应用程序启动它就会崩溃。我不确定我是否缺少图书馆,或者到底发生了什么,因为这是我与Xamarin的第一天。谢谢您的帮助。
Forwarding debugger port 8891
Detecting existing process
Loaded assembly: /storage/emulated/0/Android/data/MoodTracker_.MoodTracker_/files/.__override__/MoodTracker+.dll
Loaded assembly: Mono.Android.dll [External]
[monodroid-debug] Trying to initialize the debugger with options: --debugger-agent=transport=dt_socket,loglevel=0,address=127.0.0.1:8891,server=y,embedding=1
[libc] WARNING: generic atexit() called from legacy shared library
[Mono] Image addref mscorlib[0x66ff49d8] -> mscorlib.dll[0x66ff4018]: 1
[Mono] AOT module 'mscorlib.dll.so' not found: dlopen failed: library "/data/data/MoodTracker_.MoodTracker_/lib/mscorlib.dll.so" not found
[Mono] Assembly mscorlib[0x66ff49d8] added to domain RootDomain, ref_count=1
[Mono] Assembly Loader probing location: '/storage/emulated/0/Android/data/MoodTracker_.MoodTracker_/files/.__override__/MoodTracker+.dll'.
[Mono] Image addref MoodTracker+[0x6707e938] -> /storage/emulated/0/Android/data/MoodTracker_.MoodTracker_/files/.__override__/MoodTracker+.dll[0x6707dda8]: 2
[Mono] Assembly MoodTracker+[0x6707e938] added to domain RootDomain, ref_count=1
[Mono] AOT module '/storage/emulated/0/Android/data/MoodTracker_.MoodTracker_/files/.__override__/MoodTracker+.dll.so' not found: dlopen failed: library "/data/data/MoodTracker_.MoodTracker_/lib//storage/emulated/0/Android/data/MoodTracker_.MoodTracker_/files/.__override__/MoodTracker+.dll.so" not found
[Mono] Assembly Loader loaded assembly from location: '/storage/emulated/0/Android/data/MoodTracker_.MoodTracker_/files/.__override__/MoodTracker+.dll'.
[Mono] Config attempting to parse: '/storage/emulated/0/Android/data/MoodTracker_.MoodTracker_/files/.__override__/MoodTracker+.dll.config'.
[Mono] Config attempting to parse: '/Users/builder/data/lanes/1131/62e09eb0/source/monodroid/builds/install/mono-armv7/etc/mono/assemblies/MoodTracker+/MoodTracker+.config'.
[monodroid-gc] GREF GC Threshold: 46800
[Mono] Image addref Mono.Android[0x670b3810] -> Mono.Android.dll[0x670b3008]: 1
[Mono] Assembly Mono.Android[0x670b3810] added to domain RootDomain, ref_count=1
[Mono] AOT module 'Mono.Android.dll.so' not found: dlopen failed: library "/data/data/MoodTracker_.MoodTracker_/lib/Mono.Android.dll.so" not found
[Mono] Assembly Ref addref Mono.Android[0x670b3810] -> mscorlib[0x66ff49d8]: 2
[monodroid] Xamarin/Android Trial Mode Active
[dalvikvm-heap] Grow heap (frag case) to 8.247MB for 782912-byte allocation
[libEGL] loaded /system/lib/egl/libEGL_tegra.so
[libEGL] loaded /system/lib/egl/libGLESv1_CM_tegra.so
[libEGL] loaded /system/lib/egl/libGLESv2_tegra.so
[OpenGLRenderer] Enabling debug mode 0
[Mono] Image addref System.Core[0x6885e0f0] -> System.Core.dll[0x6885d640]: 1
[Mono] Assembly System.Core[0x6885e0f0] added to domain RootDomain, ref_count=1
[Mono] AOT module 'System.Core.dll.so' not found: dlopen failed: library "/data/data/MoodTracker_.MoodTracker_/lib/System.Core.dll.so" not found
[Mono] Assembly Ref addref Mono.Android[0x670b3810] -> System.Core[0x6885e0f0]: 2
[Mono] Assembly Ref addref System.Core[0x6885e0f0] -> mscorlib[0x66ff49d8]: 3
Loaded assembly: System.Core.dll [External]
[Mono] Assembly Loader probing location: '/MoodTracker+, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.dll'.
[Mono] Assembly Loader probing location: '/Users/builder/data/lanes/1131/62e09eb0/source/monodroid/builds/install/mono-armv7/lib/MoodTracker+, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.dll'.
[Mono] Assembly Loader probing location: '/MoodTracker+, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.exe'.
[Mono] Assembly Loader probing location: '/Users/builder/data/lanes/1131/62e09eb0/source/monodroid/builds/install/mono-armv7/lib/MoodTracker+, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.exe'.
[Mono] DllImport attempting to load: '/system/lib/liblog.so'.
[Mono] DllImport loaded library '/system/lib/liblog.so'.
[Mono] DllImport searching in: '/system/lib/liblog.so' ('/system/lib/liblog.so').
[Mono] Searching for '__android_log_print'.
[Mono] Probing '__android_log_print'.
[Mono] Found as '__android_log_print'.
[MonoDroid] Could not load type 'MoodTracker.MainActivity, MoodTracker+, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Skipping JNI registration of type 'moodtracker/MainActivity'.
[Mono] DllImport attempting to load: '__Internal'.
[Mono] DllImport loaded library '(null)'.
[Mono] DllImport searching in: '__Internal' ('(null)').
[Mono] Searching for '_monodroid_gc_wait_for_bridge_processing'.
[Mono] Probing '_monodroid_gc_wait_for_bridge_processing'.
[Mono] Found as '_monodroid_gc_wait_for_bridge_processing'.
[Mono] DllImport searching in: '__Internal' ('(null)').
[Mono] Searching for '_monodroid_get_identity_hash_code'.
[Mono] Probing '_monodroid_get_identity_hash_code'.
[Mono] Found as '_monodroid_get_identity_hash_code'.
[Mono] Assembly Loader probing location: '/MoodTracker+, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.dll'.
[Mono] Assembly Loader probing location: '/Users/builder/data/lanes/1131/62e09eb0/source/monodroid/builds/install/mono-armv7/lib/MoodTracker+, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.dll'.
[Mono] Assembly Loader probing location: '/MoodTracker+, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.exe'.
[Mono] Assembly Loader probing location: '/Users/builder/data/lanes/1131/62e09eb0/source/monodroid/builds/install/mono-armv7/lib/MoodTracker+, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.exe'.
[MonoDroid] UNHANDLED EXCEPTION:
[MonoDroid] System.TypeLoadException: Could not load type 'MoodTracker.MainActivity, MoodTracker+, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
[MonoDroid] at (wrapper managed-to-native) System.Type.internal_from_name (string,bool,bool) <0x0003f>
[MonoDroid] at System.Type.GetType (string,bool) <IL 0x00014, 0x0009b>
[MonoDroid] at Java.Interop.TypeManager.n_Activate (intptr,intptr,intptr,intptr,intptr,intptr) [0x00062] in /Users/builder/data/lanes/1131/62e09eb0/source/monodroid/src/Mono.Android/src/Java.Interop/TypeManager.cs:144
[MonoDroid] at (wrapper dynamic-method) object.46e1b4f7-4f1c-41b7-b3e1-4e33168838db (intptr,intptr,intptr,intptr,intptr,intptr) <IL 0x00029, 0x0007b>
[Mono] DllImport searching in: '__Internal' ('(null)').
[Mono] Searching for '_monodroid_gref_log_new'.
[Mono] Probing '_monodroid_gref_log_new'.
[Mono] Found as '_monodroid_gref_log_new'.
[Mono] DllImport searching in: '__Internal' ('(null)').
[Mono] Searching for '_monodroid_gref_log_delete'.
[Mono] Probing '_monodroid_gref_log_delete'.
[Mono] Found as '_monodroid_gref_log_delete'.
这是MainActivity.cs
using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
namespace MoodTracker
{
[Activity (Label = "MoodTracker+", MainLauncher = true, Icon = "@drawable/icon")]
public class MainActivity : Activity
{
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
// Set our view from the "main" layout resource
SetContentView (Resource.Layout.activity_main);
}
}
}
答案 0 :(得分:4)
@Brian指出的问题是活动标签末尾的+
符号。删除它,它会工作。