我的应用程序已在Play商店中存在很长时间,并且包含应用程序订阅购买。 在我们的测试过程中,我最近遇到了一个问题,即通过应用程序通过新的Google帐户购买订阅。
这是情景:
我们正在使用最新的iabHelper来整合商店和订阅。
调试时我发现很少有可能相关的日志消息。 从应用程序启动购买流程(launchPurchaseFlow)时,我在logcat上看到了以下消息:
E/Parcel: Class not found when unmarshalling: com.google.android.finsky.billing.lightpurchase.PurchaseParams
java.lang.ClassNotFoundException: com.google.android.finsky.billing.lightpurchase.PurchaseParams
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:251)
at java.lang.Class.forName(Class.java:216)
at android.os.Parcel.readParcelableCreator(Parcel.java:2133)
at android.os.Parcel.readParcelable(Parcel.java:2097)
at android.os.Parcel.readValue(Parcel.java:2013)
at android.os.Parcel.readArrayMapInternal(Parcel.java:2314)
at android.os.Bundle.unparcel(Bundle.java:249)
at android.os.Bundle.getString(Bundle.java:1118)
at android.content.Intent.getStringExtra(Intent.java:5221)
at com.android.server.am.ActivityStackSupervisor.startActivityLocked(ActivityStackSupervisor.java:1477)
at com.android.server.am.ActivityStackSupervisor.startActivityMayWait(ActivityStackSupervisor.java:1080)
at com.android.server.am.ActivityManagerService.startActivityInPackage(ActivityManagerService.java:4600)
at com.android.server.am.PendingIntentRecord.sendInner(PendingIntentRecord.java:254)
at com.android.server.am.ActivityManagerService.startActivityIntentSender(ActivityManagerService.java:4481)
at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:262)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2762)
at android.os.Binder.execTransact(Binder.java:404)
at dalvik.system.NativeStart.run(Native Method)
Caused by: java.lang.NoClassDefFoundError: com/google/android/finsky/billing/lightpurchase/PurchaseParams
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:251)
at java.lang.Class.forName(Class.java:216)
at android.os.Parcel.readParcelableCreator(Parcel.java:2133)
at android.os.Parcel.readParcelable(Parcel.java:2097)
at android.os.Parcel.readValue(Parcel.java:2013)
at android.os.Parcel.readArrayMapInternal(Parcel.java:2314)
at android.os.Bundle.unparcel(Bundle.java:249)
at android.os.Bundle.getString(Bundle.java:1118)
at android.content.Intent.getStringExtra(Intent.java:5221)
at com.android.server.am.ActivityStackSupervisor.startActivityLocked(ActivityStackSupervisor.java:1477)
at com.android.server.am.ActivityStackSupervisor.startActivityMayWait(ActivityStackSupervisor.java:1080)
at com.android.server.am.ActivityManagerService.startActivityInPackage(ActivityManagerService.java:4600)
at com.android.server.am.PendingIntentRecord.sendInner(PendingIntentRecord.java:254)
at com.android.server.am.ActivityManagerService.startActivityIntentSender(ActivityManagerService.java:4481)
at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:262)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2762)
at android.os.Binder.execTransact(Binder.java:404)
at dalvik.system.NativeStart.run(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.finsky.billing.lightpurchase.PurchaseParams" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:67)
at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:251)
at java.lang.Class.forName(Class.java:216)
at android.os.Parcel.readParcelableCreator(Parcel.java:2133)
at android.os.Parcel.readParcelable(Parcel.java:2097)
at android.os.Parcel.readValue(Parcel.java:2013)
at android.os.Parcel.readArrayMapInternal(Parcel.java:2314)
at android.os.Bundle.unparcel(Bundle.java:249)
at android.os.Bundle.getString(Bundle.java:1118)
at android.content.Intent.getStringExtra(Intent.java:5221)
at com.android.server.am.ActivityStackSupervisor.startActivityLocked(ActivityStackSupervisor.java:1477)
at com.android.server.am.ActivityStackSupervisor.startActivityMayWait(ActivityStackSupervisor.java:1080)
at com.android.server.am.ActivityManagerService.startActivityInPackage(ActivityManagerService.java:4600)
at com.android.server.am.PendingIntentRecord.sendInner(PendingIntentRecord.java:254)
at com.android.server.am.ActivityManagerService.startActivityIntentSender(ActivityManagerService.java:4481)
at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:262)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2762)
at android.os.Binder.execTransact(Binder.java:404)
at dalvik.system.NativeStart.run(Native Method)
从Play商店收到错误消息时,我可以在logcat上看到以下内容:
I/Finsky: [1] com.google.android.finsky.l.ao.run(138): Applying library update: account=[EHqg24VFVJk2mUDkHOexGliDIyk]
I/Finsky: [1] com.google.android.finsky.billing.lightpurchase.PurchaseFragment.a(22698): Error: PurchaseError{type=3 subtype=0}
其他信息: