我收到一條錯誤消息,因為我在同一個類中有以下兩行代碼:using Xamarin.Forms;
using Android.App;錯誤 CS0104:“應用程序”是“Android.App.Application”和“Xamarin.Forms.Application”之間的模糊引用 if (Device.RuntimePlatform == Device.Android)
deviceID = Settings.Secure.GetString(Application.Context.ContentResolver, Settings.Secure.AndroidId);如何使用 Android.App 執行代碼?我需要設備 ID。我無法刪除“使用 Xamarin.Forms;” 因為我在課堂上使用它。
如何在同一個類中使用 Android.App.Application 和 Xamarin.
慕尼黑5688855
2023-04-29 16:53:13