我在使用應用內結算開發應用新的,我已經implmented,但一些 倍給我下面的錯誤 在-app計費錯誤:無法購買商品,錯誤應對:7:項目已經擁有 給我的解決方案就可以了應用內結算錯誤:無法購買商品,錯誤應對:7:項目已經擁有
3
A
回答
2
您需要再次購買之前要消耗的物品..
IabHelper mHelper = new IabHelper(ACTIVITY, base64EncodedPublicKey);
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
// Pass on the activity result to the helper for handling
if (!mHelper.handleActivityResult(requestCode, resultCode, data)) {
super.onActivityResult(requestCode, resultCode, data);
}
else {
Log.d(TAG, "onActivityResult handled by IABUtil.");
}
}
1
舉個例子在Android Developer site中給出的項目 命名爲TrivialDrive我們可以使用purch ased項目如下...
// Check for gas delivery -- if we own gas, we should fill up the tank immediately
Purchase gasPurchase = inventory.getPurchase(SKU_GAS);
if (gasPurchase != null && verifyDeveloperPayload(gasPurchase)) {
Log.d(TAG, "We have gas. Consuming it.");
mHelper.consumeAsync(inventory.getPurchase(SKU_GAS), mConsumeFinishedListener);
return;
}
// Called when consumption is complete
IabHelper.OnConsumeFinishedListener mConsumeFinishedListener = new IabHelper.OnConsumeFinishedListener() {
public void onConsumeFinished(Purchase purchase, IabResult result) {
Log.d(TAG, "Consumption finished. Purchase: " + purchase + ", result: " + result);
// if we were disposed of in the meantime, quit.
if (mHelper == null) return;
// We know this is the "gas" sku because it's the only one we consume,
// so we don't check which sku was consumed. If you have more than one
// sku, you probably should check...
if (result.isSuccess()) {
// successfully consumed, so we apply the effects of the item in our
// game world's logic, which in our case means filling the gas tank a bit
Log.d(TAG, "Consumption successful. Provisioning.");
mTank = mTank == TANK_MAX ? TANK_MAX : mTank + 1;
saveData();
alert("You filled 1/4 tank. Your tank is now " + String.valueOf(mTank) + "/4 full!");
}
else {
complain("Error while consuming: " + result);
}
updateUi();
setWaitScreen(false);
Log.d(TAG, "End consumption flow.");
}
};
希望!!!它幫助你。你可以通過這個例子項目。
+0
您是否知道無法購買錯誤5 - 開發人員錯誤> – keen
+0
RESULT_DEVELOPER_ERROR = 5 - 提供給API的無效參數可以在給定的IInAppBillingService.aidl中檢查 –
相關問題
- 1. 無法購買商品,錯誤回覆:7:商品已擁有
- 2. 在Android應用程序中購買:錯誤響應:7項目已經擁有
- 3. Corona - 應用內購買易損件產品錯誤(您已經購買....)
- 4. 錯誤您已擁有這項商品
- 5. 錯誤購買物品應用程式內結算的Android
- 6. 應用內結算 - 商品無法購買
- 7. 應用內購買錯誤
- 8. Android應用內購買「您所要求的商品不能購買」錯誤
- 9. Android IN應用購買 - 商品已擁有問題
- 10. IAB錯誤您已擁有此商品
- 11. 使用Android應用內結算購買商品時出現無法識別的錯誤
- 12. 用戶在出現錯誤後無法購買其他商品:「您試圖購買的商品無法找到」
- 13. 谷歌播放應用程式內結算購買錯誤
- 14. 谷歌應用內結算 - 處理購買錯誤[DF-IATPU-08]
- 15. Android應用內付費錯誤:無法購買此商品。 (錯誤代碼:IAB-DPTL)
- 16. 應用購買錯誤-1001
- 17. 在應用程序購買 - 購買錯誤的產品
- 18. Android應用內結算,多次購買同一商品
- 19. 如何通過應用內結算購買5件商品?
- 20. Android:購買後購買產品(應用內結算)
- 21. 「您請求的項目不可購買」android應用內購買錯誤
- 22. iphone:應用程序內購買錯誤
- 23. 應用內購買分析錯誤146
- 24. 應用程序內購買錯誤
- 25. 在應用程序內購買錯誤
- 26. 應用程序內購買錯誤0
- 27. 如何在應用結算中從Google購買所有商品?
- 28. 應用內購買返回0商品
- 29. Android應用內購買錯誤:您的訂單無法處理
- 30. 應用程序內購買錯誤 - 消耗品你已經購買了此項目,但目前還沒有被下載
我討厭那些總是打倒別人的帖子的「專家」。所以我投票給你,雖然你的問題是不完整的。但我認爲任何遇到此問題的人都應該明白。 –
非常感謝我們的投票 – asiya