简体   繁体   English

classnotfound崩溃没有出现在崩溃现象中,但是在Google Play控制台中

[英]classnotfound crashes not showing up in crashlytics, but in google play console

We are trying to debug a crash that happens for some users, but can't figure out exactly what it is. 我们正在尝试调试某些用户发生的崩溃,但无法确切地知道它是什么。

In Google Play console, we see this: 在Google Play控制台中,我们看到:

java.lang.RuntimeException:  
  at android.app.ActivityThread.handleReceiver (ActivityThread.java:3331)
  at android.app.ActivityThread.-wrap20 (ActivityThread.java)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1734) 
  at android.os.Handler.dispatchMessage (Handler.java:102) 
  at android.os.Looper.loop (Looper.java:154)
  at android.app.ActivityThread.main (ActivityThread.java:6688)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1468)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1358)
Caused by: java.lang.ClassNotFoundException: 
  at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:56)
  at java.lang.ClassLoader.loadClass (ClassLoader.java:380)
  at java.lang.ClassLoader.loadClass (ClassLoader.java:312)
  at android.app.ActivityThread.handleReceiver (ActivityThread.java:3326)

We have Crashlytics set up in the project, and it is the first thing that loads when the app starts running. 我们在项目中设置了Crashlytics,这是应用程序开始运行时加载的第一件事。 I suspect that perhaps one of the classes is missing from the manifest, but we looked at it (even disasemmbled the APK just to make sure) and they are all there. 我怀疑清单中可能缺少其中一个类,但是我们看了它(甚至为了确保它而消除了APK)并且它们都在那里。

We suspect that perhaps it is a class that one of the activities use during initialization, but some of them are 3rd party SDKs so we do not have access to their source. 我们怀疑它可能是其中一个活动在初始化期间使用的类,但其中一些是第三方SDK,因此我们无法访问其源代码。

Is there a way to see the class name that wasn't found? 有没有办法看到找不到的类名? The errors don't show up on crashlytics and we are unable to reproduce it on any of the devices / emulators that we have. 错误不会出现在崩溃问题上,我们无法在我们拥有的任何设备/模拟器上重现错误。

Thanks! 谢谢!

Edit : Partial Resolution 编辑:部分解决方案

The problem ended up being a notification package that we are using, that requires vendor-specific entries (which we do not have in our test devices) in the AndroidManifest.xml. 问题最终成为我们正在使用的通知包,它需要AndroidManifest.xml中特定于供应商的条目(我们的测试设备中没有这些条目)。 After reintegrating almost all of our 3rd party services, we eventually saw the crash report disappear. 在重新整合了我们几乎所有的第三方服务后,我们最终看到崩溃报告消失了。

We were not able to achieve our general goal (get the exception text, not just the exception stack trace, from exceptions logged to Google Play Developer Console), so there is no "good" way (as far as we are aware) to find out which class was missing. 我们无法实现我们的总体目标(从记录到Google Play开发者控制台的异常中获取异常文本,而不仅仅是异常堆栈跟踪),因此找不到“好的”方法(据我们所知)哪个班级丢失了。 Quite disappointing TBH. 相当令人失望的TBH。

So not all users experience this exception. 因此,并非所有用户都遇到此异常。 Clearly, at the run time, for those users, there is no such class known to the loader. 显然,在运行时,对于那些用户来说,加载器不会知道这样的类。 My thought is that you are using a lib (like lib.so, either your own native code or a 3rd party lib) which its native code does not support a certain architecture (like MIPS, or Intel) and therefore such devices get the exception. 我的想法是你正在使用lib(如lib.so,你自己的本机代码或第三方lib),它的本机代码不支持某种架构(如MIPS或Intel),因此这些设备会获得异常。 Just something to investigate. 只是要调查一下。 There are emulators for different architectures so you might not even need real hardware to test if this is the root cause. 有不同体系结构的仿真器,因此您可能甚至不需要真正的硬件来测试这是否是根本原因。

  • The problem is at least one of the 3rd party libraries you use have reflection and you don't have neccessary proguard-rules in your proguard-rules.pro 问题是你使用的第三方库中至少有一个有反射,而你的proguard-rules没有必要的proguard-rules

  • also In some cases, this could be a MultiDex issue. 在某些情况下,这可能是MultiDex问题。 Try this in your application class. 在您的应用程序类中试试这个。 That is in App.java which extends Application: 这是在App.java中扩展应用程序:

  @Override protected void attachBaseContext(Context base) { super.attachBaseContext(base); MultiDex.install(this); // this is the key code } 

Crashlytics will not update immediately. Crashlytics不会立即更新。

That crash will report in Crashlytics once the user open app again after crash. 一旦用户在崩溃后再次打开应用程序,该崩溃将在Crashlytics中报告。

Possible cases 可能的情况

  1. Your crashed device may not open the app after the crash 崩溃后,崩溃的设备可能无法打开应用程序
  2. May be uninstalled after crash 崩溃后可能会被卸载

Try this in build.gradle: 在build.gradle中尝试这个:

android {
    defaultConfig {
        ...
        minSdkVersion 15 
        targetSdkVersion 26
        multiDexEnabled true
    }
    ...
}

dependencies {
  compile 'com.android.support:multidex:1.0.1'
}

and in application class: 应用程序类中:

public class MyApplication extends Application {
  @Override
  protected void attachBaseContext(Context base) {
     super.attachBaseContext(base);
     MultiDex.install(this);
  }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Google Play开发者控制台与Crashlytics控制台中崩溃 - Crashes in Google Play Developer console vs Crashlytics Console Android 崩溃报告未显示在 Google Play 控制台的 ANR 和崩溃报告中 - Android crash reports are not showing up in Google play console's ANRs & Crashes report 在崩溃和ANR Google开发者控制台中未显示崩溃 - Not showing up crashes in crashes & ANR Google developer console 项目显示在Google Play开发者控制台中,而不显示在Google Developer Console中 - Project showing up in Google Play Dev Console, but not in Google Developer Console Android 崩溃报告:Google Play 控制台中报告的崩溃比 Crashlytics 多得多 - Android Crash Reporting: much more crashes reported in Google Play Console than Crashlytics 在开发人员控制台中显示崩溃 - Crashes showing up in Developer Console Firebase Crashlytics 控制台不再显示新版本或旧版本的崩溃 - Firebase Crashlytics Console not showing crashes on neither new or old builds anymore Google Play开发者控制台崩溃和ANR - Google play developer console crashes and ANRs Google Play排行榜未显示 - Google Play Leaderboards Not Showing Up 应用未显示在Google Play中 - App not showing up in Google Play
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM