我可以运行我的应用程序没有任何问题在Android 6.0+设备上,但我需要强大的与Android 4.4的retrocompatibility。Xamarin.Android Android 4.4(API 19)在启动时引发错误使用Xamarin.Forms
我将目标android版本和最低版本设置为KitKat,并将编译版本保留为“使用最新版本”。该应用程序构建,但不运行在我的设备或模拟器[19级](我得到的“应用程序已停止”警报比没有)。该应用程序仍然适用于较新的设备。
我试图将编译版本设置为API Level 19,但是我的应用程序没有这种编译方式。我得到这个错误:
No resource found that matches the given name: attr 'android:elevation'
于是,我就从降级版本25.xx我Xamarin形式包19.xx但提醒的NuGet我说,这些软件包并不存在:
...
<package id="Xamarin.Android.Support.Annotations" version="19.0.0" targetFramework="monoandroid71" />
<package id="Xamarin.Android.Support.Compat" version="19.0.0" targetFramework="monoandroid71" />
...
在logcat中,我发现:'致命异常:主要 过程:it.xxx.android,PID:12703 了java.lang.RuntimeException:无法实例化应用md58be93af4beb389e425842ea692c954d2.MainApplication:抛出java.lang.ClassNotFoundException:未找到“md58be93af4beb389e425842ea692c954d2.MainApplication”' – Cristiano