Google Play商店已停止
问题描述:
我在使用Google Play商店的应用中使用了应用购买功能。我从9.8.0更新了我的播放版本到11.0.1。在尝试购买产品时,更新后,我收到弹出窗口,说google play store已停止。但它在制作中运行良好。我有点困惑,这是因为播放服务更新而发生这种崩溃。Google Play商店已停止
我收到以下崩溃:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.firstrun.prototyze, PID: 10412
Theme: themes:{default=overlay:system, iconPack:system, fontPkg:system, com.android.systemui=overlay:system, com.android.systemui.navbar=overlay:system}
java.lang.NullPointerException: Attempt to invoke interface method 'android.os.Bundle com.android.vending.billing.IInAppBillingService.getBuyIntent(int, java.lang.String, java.lang.String, java.lang.String, java.lang.String)' on a null object reference
at com.android.mobiefit.sdk.manager.PurchaseManager.purchase(PurchaseManager.java:123)
at com.firstrun.prototyze.ui.selectprogram.ProgramPurchaseDetailActivity$8.onRequestSuccess(ProgramPurchaseDetailActivity.java:379)
at com.android.mobiefit.sdk.manager.TransactionManager.lambda$transactionEvent$0(TransactionManager.java:46)
at com.android.mobiefit.sdk.manager.TransactionManager$$Lambda$1.accept(Unknown Source)
at io.reactivex.internal.observers.ConsumerSingleObserver.onSuccess(ConsumerSingleObserver.java:59)
at io.reactivex.internal.operators.single.SingleObserveOn$ObserveOnSingleObserver.run(SingleObserveOn.java:81)
at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:109)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5461)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
,这里是我的采购经理:
//Last parameter - RUN=false, BODY=true
public boolean purchase(String productShortcode, String sku, Activity activityObj, boolean subscription) throws RemoteException, IntentSender.SendIntentException {
Log.d(TAG, "Start Purchase");
String type = "inapp";
if(subscription) {
type = "subs";
}
Bundle buyIntentBundle = mService.getBuyIntent(3, activityObj.getPackageName(),
sku, type, productShortcode);
for(String key : buyIntentBundle.keySet()) {
Log.d("Purchase", key +" :: " + buyIntentBundle.get(key));
}
if(buyIntentBundle.getInt("RESPONSE_CODE", 0) == 7) {
Log.d(TAG, "Item is already purchased, consume and try again");
return false;
}
PendingIntent pendingIntent = buyIntentBundle.getParcelable("BUY_INTENT");
activityObj.startIntentSenderForResult(pendingIntent.getIntentSender(),
1001, new Intent(), Integer.valueOf(0), Integer.valueOf(0),
Integer.valueOf(0));
return true;
}
有人能告诉我是什么问题?
答
这是谷歌播放存储版本错误 没有必要担心。
在应用程序内购买与老谷歌Play商店的版本只是测试它的工作:)
有关详细信息,请参阅本question
编辑:在新的谷歌Play商店的版本2017年8月11日
现在8.0 .73.R-全部[0] [PR] 162689464谷歌修复这崩溃问题,我已经成功地在我的设备上测试过,所以现在你不再面临这个问题。 :)
答
在我的P9 Lite中,当我尝试启动应用程序时,它崩溃而没有任何消息。我刚刚尝试清除缓存,但唯一的解决方案是删除更新并使用最新版本。
10分钟后,护目镜发现更新,重新安装版本8..0.73.R-all [0] [PR] 162689464,10分钟后应用程序再次崩溃。我不知道如何解决这个问题,因为应用程序的自动更新始于任何问题。
看起来像'mService'字段在调用'purchase'时尚未初始化。 –