[英]Crash on Google Play Pre-Launch Report: java.lang.NoSuchMethodError
Getting some very odd behaviour on my Google Play Pre-Launch report, and it's only just started occurring, but I can't pin it down to anything I have changed.在我的 Google Play 预发布报告中出现一些非常奇怪的行为,它才刚刚开始出现,但我无法将其归因于我所做的任何更改。 I also can't reproduce the issue myself.我自己也无法重现该问题。
Every test device seems to be failing in the pre-launch report (6/6 devices all fail the same way).每个测试设备似乎都在预发布报告中失败(6/6 设备都以相同的方式失败)。 However repeating the steps on the same build on a real device, I can never recreate it.然而,在真实设备上对同一个构建重复这些步骤,我永远无法重新创建它。 The stack trace is as follows:堆栈跟踪如下:
FATAL EXCEPTION: Thread-8
Process: uk.myapp.test, PID: 25312
java.lang.NoSuchMethodError: No static method createWithResource(Landroid/content/res/Resources;Ljava/lang/String;I)Landroidx/core/graphics/drawable/IconCompat; in class Landroidx/core/graphics/drawable/IconCompat; or its super classes (declaration of 'androidx.core.graphics.drawable.IconCompat' appears in base.apk)
at androidx.core.app.NotificationCompat$Action.<init>(NotificationCompat.java:4572)
at com.google.android.exoplayer2.ui.PlayerNotificationManager.createPlaybackActions(PlayerNotificationManager.java:1439)
at com.google.android.exoplayer2.ui.PlayerNotificationManager.<init>(PlayerNotificationManager.java:757)
at com.google.android.exoplayer2.ui.PlayerNotificationManager$Builder.build(PlayerNotificationManager.java:564)
at uk.myapp.test.AudioPlayerService.onCreate(AudioPlayerService.java:96)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:3570)
at android.app.ActivityThread.access$1300(ActivityThread.java:200)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1672)
at android.os.Handler.dispatchMessage(Handler.java:106)
at androidx.test.espresso.base.Interrogator.loopAndInterrogate(Interrogator.java:10)
at androidx.test.espresso.base.UiControllerImpl.loopUntil(UiControllerImpl.java:7)
at androidx.test.espresso.base.UiControllerImpl.loopUntil(UiControllerImpl.java:1)
at androidx.test.espresso.base.UiControllerImpl.injectMotionEvent(UiControllerImpl.java:5)
at androidx.test.espresso.action.MotionEvents.sendUp(MotionEvents.java:6)
at androidx.test.espresso.action.MotionEvents.sendUp(MotionEvents.java:1)
at androidx.test.espresso.action.Tap.sendSingleTap(Tap.java:5)
at androidx.test.espresso.action.Tap.-$$Nest$smsendSingleTap(Unknown Source:0)
at androidx.test.espresso.action.Tap$1.sendTap(Tap.java:1)
at androidx.test.espresso.action.GeneralClickAction.perform(GeneralClickAction.java:4)
at androidx.test.espresso.ViewInteraction$SingleExecutionViewAction.perform(ViewInteraction.java:2)
at androidx.test.espresso.ViewInteraction.doPerform(ViewInteraction.java:21)
at androidx.test.espresso.ViewInteraction.-$$Nest$mdoPerform(Unknown Source:0)
at androidx.test.espresso.ViewInteraction$1.call(ViewInteraction.java:2)
at androidx.test.espresso.ViewInteraction$1.call(ViewInteraction.java:1)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6718)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
I implemented reverting the Firebase BOM version like the other answer suggested, but it didn't (or at least didn't fully resolve) the issue for me.我像其他答案建议的那样实施了恢复 Firebase BOM 版本,但它没有(或至少没有完全解决)我的问题。 Reverting this other dependency finished solving it for me:还原这个其他依赖项为我解决了它:
Crashing version:崩溃版本:
implementation 'com.google.android.gms:play-services-location:19.0.1'
Working version:工作版本:
implementation 'com.google.android.gms:play-services-location:18.0.0'
Not exactly sure but I think it's an issue with the Robo tests that Firebase test lab uses.不完全确定,但我认为这是 Firebase 测试实验室使用的机器人测试的问题。 I haven't tried using their instrumented tests instead, but it's the only explanation I can currently think of.我没有尝试过使用他们的仪器测试,但这是我目前能想到的唯一解释。
Ok, I have found the issue, it's related to the 29.0.3 elease of Google Firebase BOM.好的,我找到了问题,它与 Google Firebase BOM 的 29.0.3 elease 有关。
Reverting from:恢复自:
com.google.firebase:firebase-bom:29.0.3 com.google.firebase:firebase-bom:29.0.3
To:至:
com.google.firebase:firebase-bom:29.0.2 com.google.firebase:firebase-bom:29.0.2
Completely solves my issue.彻底解决了我的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.