我可以運行我的應用程序沒有任何問題在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