我正在开发Xamarin跨平台应用程序,其中使用了Google Cloud Messaging服务。因此,当我调用以下方法时,会出现异常:“设备没有com.google.android.gsf软件包”。
我尝试在Visual Studio Android模拟器(MarshMallow Android 6.0 - API 23和Lollipop Android 5.1 - API 22)上运行该项目,如何解决这个问题?谢谢。
try {
GcmClient.CheckDevice(this);
GcmClient.CheckManifest(this);
// Register for push notifications
Log.Info("MainActivity", "Registering...");
GcmClient.Register(this, Constants.SenderID);
}
catch(Exception ex)
{
}