Bundle buyIntentBundle = inappService.getBuyIntent(3, this.getPackageName(), "android.test.purchased", "inapp", "myUserId");
int responseCode = buyIntentBundle.getInt("RESPONSE_CODE");
if (responseCode == 0) {
PendingIntent pendingIntent = buyIntentBundle.getParcelable("BUY_INTENT");
this.startIntentSenderForResult(pendingIntent.getIntentSender(), PURCHASE_REQUEST_CODE, new Intent(), 0, 0, 0);
}
購買當我執行上面的代碼看起來正確的,我的谷歌遊戲服務將停止運行(崩潰?)谷歌播放服務停止工作時,我就與android.test.purchased
此使用在幾天前工作。但現在它已經停止。
你們知道我能做什麼嗎?當我使用beta測試用戶測試真實產品時,一切仍然有效。
這是添加的堆棧跟蹤。看起來它來自Google Play商店本身。
07-21 14:28:51.172 18056-18224/? E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #4
Process: com.android.vending, PID: 18056
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:318)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:762)
Caused by: java.lang.NullPointerException: Attempt to read from field 'long com.google.wireless.android.finsky.dfe.nano.an.b' on a null object reference
at com.google.android.finsky.billing.lightpurchase.s.a(SourceFile:5)
at com.google.android.finsky.billing.lightpurchase.h.doInBackground(SourceFile:27)
at android.os.AsyncTask$2.call(AsyncTask.java:304)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:762)
是的,我現在有同樣的問題。它在一週前工作。但今天的應用程序崩潰。我沒有找到像更新谷歌播放等任何解決方案:/ – MarsPeople
我也有同樣的問題。我在2臺設備上測試過,但沒有運氣。是否有人找到解決方案,然後請在這裏發佈 –
@HarinKaklotar我認爲我們應該等待「谷歌播放商店」更新修復「玩商店應用程序崩潰」問題。 – MarsPeople