簡體   English   中英

android google play billing library v2.0.3acknowledgePurchase failed with error code 5 in Android Q (api 29)

[英]android google play billing library v2.0.3 acknowledgePurchase failed with error code 5 in Android Q (api 29)

我遵循了 google 示例代碼,但它無法確認非消耗性產品的購買,並且只能在 Android Q (api 29) 上獲得退款。

返回的錯誤是代碼 5 ,即 DEVELOPER_ERROR,它定義為“提供給 API 的參數無效。此錯誤還可能表明應用程序未正確簽名或未正確設置 Google Play 中的應用內結算,或者沒有其清單中的必要權限”在文檔中。

https://developer.android.com/google/play/billing/billing_library_overview#acknowledge

知道這是怎么發生的嗎? 它在其他 Android 版本手機中運行良好。

在嘗試了很多選項后,終於找到了答案。

我試圖確認已經確認的購買。 因此,舊的 android 版本基本上接受了這一點,而在 Android Q 中,它返回一個錯誤。 所以我檢查了purchase.isAcknowledged並解決了問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM