xamarin.forms - 无法从 Plugin.InAppBilling.ItemType 转换为 bool
问题描述
我使用作者 jamesmontemagno 4.x 版的 InAppBilling 插件。(最后稳定)
按照代码返回错误:无法从 'Plugin.InAppBilling.ItemType' 转换为 'bool'
原始示例方法由 jamesmontemagno
var connected = await billing.ConnectAsync(ItemType.InAppPurchase);
解决方案
文档清楚地指出
更改:等待 CrossInAppBilling.Current.ConnectAsync(ItemType.InAppPurchase); 等待 CrossInAppBilling.Current.ConnectAsync();
推荐阅读
- c++ - 为什么 QXmlQuery 似乎在结果中添加了一个`\n`?(以及如何解决?)
- python - python中的Paser XML
- html - CSS - 将文本与 div 对齐
- java - Java 多个键直接指向相同的值
- swift - 如何修复 GPUImage2 框架在从后台应用程序中删除时导致错误?
- sql - 将 MS SQL 服务器与 Google Data Studio 连接的最佳方式是什么?
- c - C结构自释放
- android - 如何解析 http 异常 401 上的成功正文响应?
- xamarin.forms - Xamarin Forms -> Activity Indicator not working if statements of statements to be executed
- google-chrome-extension - 如何从 chrome 扩展程序中询问谷歌密码?