小编Lor*_*TAO的帖子

Google Play 测试应用程序崩溃 - java.lang.NoSuchFieldError:没有 Lkotlinx/coroutines/CoroutineExceptionHandler 类型的字段键

该应用程序可以在工作室和真实设备上经过测试的模拟器上稳定运行。当上传到 Google Play 的内部测试部分时,设备始终崩溃:

谷歌 Pixel 6 1080x2400 Android 12 (SDK 31) 8,192 MB arm64-v8a。

Google Play 控制台堆栈跟踪

Exception java.lang.NoSuchFieldError: No field Key of type Lkotlinx/coroutines/CoroutineExceptionHandler$Key; in class Lkotlinx/coroutines/CoroutineExceptionHandler; or its superclasses (declaration of 'kotlinx.coroutines.CoroutineExceptionHandler' appears in /data/app/~~KWhmPpaU6JtpmIAZBH3isw==/androidx.test.tools.crawler-P3SH8J3nls-tHnM5nwslZg==/base.apk)
  at ua.at.tsvetkov.weather.ui.outfits.quick.QuickSelectionViewModel.<init> (QuickSelectionViewModel.kt:235)
  at ua.at.tsvetkov.weather.DaggerAppWeather_HiltComponents_SingletonC$ViewModelCImpl$SwitchingProvider.get (DaggerAppWeather_HiltComponents_SingletonC.java:644)
  at dagger.hilt.android.internal.lifecycle.HiltViewModelFactory$2.createViewModel (HiltViewModelFactory.java:133)
  at dagger.hilt.android.internal.lifecycle.HiltViewModelFactory$2.create (HiltViewModelFactory.java:104)
  at dagger.hilt.android.internal.lifecycle.HiltViewModelFactory.create (HiltViewModelFactory.java:171)
  at androidx.lifecycle.ViewModelProvider.get (ViewModelProvider.kt:184)
  at androidx.lifecycle.ViewModelProvider.get (ViewModelProvider.kt:150)
  at androidx.lifecycle.ViewModelLazy.getValue (ViewModelLazy.kt:53)
  at androidx.lifecycle.ViewModelLazy.getValue (ViewModelLazy.kt:35)
  at ua.at.tsvetkov.weather.ui.outfits.quick.QuickSelectionFragment.getViewModel (QuickSelectionFragment.kt:55)
  at ua.at.tsvetkov.weather.ui.outfits.quick.QuickSelectionFragment.onCreateView (QuickSelectionFragment.kt:62)
  at androidx.fragment.app.Fragment.performCreateView (Fragment.java:3114)
  at androidx.fragment.app.FragmentStateManager.createView (FragmentStateManager.java:557)
  at androidx.fragment.app.FragmentStateManager.moveToExpectedState (FragmentStateManager.java:272) …
Run Code Online (Sandbox Code Playgroud)

android proguard google-play-console kotlin-coroutines

8
推荐指数
1
解决办法
575
查看次数