无法从 Plugin.InAppBilling.ItemType 转换为 bool

Cannot convert from Plugin.InAppBilling.ItemType to bool

我使用的是作者 jamesmontemagno 版本 4.x 的 InAppBilling 插件。 (最后稳定)

遵循代码 return 错误:无法从 'Plugin.InAppBilling.ItemType' 转换为 'bool'

原创 example Method 作者:jamesmontemagno

var connected = await billing.ConnectAsync(ItemType.InAppPurchase);

docs 清楚备注

Change: await CrossInAppBilling.Current.ConnectAsync(ItemType.InAppPurchase); to await CrossInAppBilling.Current.ConnectAsync();