私はこのXamarin:廃止されたForms.ContextとAlertDialog.Builder
AlertDialog.Builder b = new AlertDialog.Builder(Forms.Context);
ようにそれを作成するために使用され、それがうまく働きました。しかしForms.Contextは、私は、代替コンストラクタ
AlertDialog.Builder b = new AlertDialog.Builder(Android.App.Application.Context, Resource.Style.Theme_AppCompat_Light);
を試してみましたが、それは
Android.Views.WindowManagerBadTokenException: Unable to add window -- token null is not for an application
でクラッシュし、今私は今では
Android.Content.Res.Resources+NotFoundException: Resource ID #0x0
でクラッシュし
AlertDialog.Builder b = new AlertDialog.Builder(Android.App.Application.Context);
にそれを変更廃止されました
だからどのようなc ontext XF2.5のAlertDialog.Builder()に渡しますか?私はこれのためのサードパーティのライブラリをインストールするような気がしません。
MainActivity – cvanbeek