[英]How to register my own Application subclass in Xamarin.Android?
[英]Xamarin.Android Application Subclass Crashes
我是Xamarin的新手。 我正在嘗試創建以下代碼的應用程序類
[Application]
class MyCustomApplicationClass : Application
{
public MyCustomApplicationClass (IntPtr handle, JniHandleOwnership ownerShip) : base (handle, ownerShip)
{
}
public override void OnCreate ()
{
base.OnCreate();
// add your custom stuff e.g. here...
}
}
沒有MyCustomApplicationClass應用程序運行正常時,它會使應用程序崩潰。
編輯:-
該錯誤通常是由於支持庫和所使用的Android sdk版本之間存在沖突。 檢查版本是否相同(所有25.x或所有26.x,...),還原軟件包,清理所有內容並啟動。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.