google 控制台内部测试错误“尝试在空对象引用上调用虚拟方法 'java.lang.Class java.lang.Object.getClass()'”

问题描述 投票:0回答:2

测试了所有 Pixel 设备,只有 Pixel 8 日志显示此错误:

java.lang.NullPointerException:  Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
Exception java.lang.NullPointerException:  Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
at android.os.Parcel.createExceptionOrNull (Parcel.java:3189)
at android.os.Parcel.createException (Parcel.java:3167)
at android.os.Parcel.readException (Parcel.java:3150)
at android.database.DatabaseUtils.readExceptionFromParcel (DatabaseUtils.java:202)
at android.database.DatabaseUtils.readExceptionFromParcel (DatabaseUtils.java:154)
at android.content.ContentProviderProxy.call (ContentProviderNative.java:764)
at android.content.ContentResolver.call (ContentResolver.java:2466)
at android.content.ContentResolver.call (ContentResolver.java:2446)
at ekfr.a (:com.google.android.gms@[email protected] (190400-633713831):29)
at  com.google.android.gms.wallet.intentoperation.setupwizard.PaymentsSetupWizardAccountChangeIntentOperation.onHandleIntent (:com.google.android.gms@[email protected] (190400-633713831):252)
At com. Google. Android. Chimera. IntentOperation. OnHandleIntent (: com. Google. Android. The GMS @ 242013038 @24.20.13 (190400-633713831) : 2)
at ajdw.onHandleIntent (:com.google.android.gms@[email protected] (190400-633713831):8)
at pbh.run (:com.google.android.gms@[email protected] (190400-633713831):70)
at pbg.run (:com.google.android.gms@[email protected] (190400-633713831):152)
at elbx.run (:com.google.android.gms@[email protected] (190400-633713831):21)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:644)
at java.lang.Thread.run (Thread.java:1012)

我尝试在firebase test lab中使用p8 pro、p8a和p8进行测试,但只有p8打印了这样的内容。我希望它不要打印这样的错误日志,这样我每次内测的时候都会报错要求我修改,或者应该怎么修改?

android google-cloud-platform google-app-engine
2个回答

0
投票

尝试添加到您的 Gradle 文件中:

dependencies {
    implementation 'com.google.android.gms:play-services-wallet:19.4.0'
}

以及您的 AndroidManifest.xml:

<meta-data 
    android:name="com.google.android.gms.wallet.api.enabled"
    android:value="true" />

更多信息在这里:

https://developers.google.com/pay/api/android/guides/setup

© www.soinside.com 2019 - 2024. All rights reserved.