java - 找不到类异常 : Unknown Class Name

标签 java android eclipse google-play cocos2d-x

我的应用程序崩溃了,它在随机设备上随机发生。 Play 上显示的崩溃日志显示如下内容。但未指定未找到的类名。

 java.lang.RuntimeException: 
       at android.app.ActivityThread.handleReceiver (ActivityThread.java:2713)
       at android.app.ActivityThread.access$1800 (ActivityThread.java:153)
       at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1428)
       at android.os.Handler.dispatchMessage (Handler.java:102)
       at android.os.Looper.loop (Looper.java:148)
       at android.app.ActivityThread.main (ActivityThread.java:5437)
       at java.lang.reflect.Method.invoke (Native Method)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:738)
       at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:628)
     Caused by: java.lang.ClassNotFoundException: 
       at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:56)
       at java.lang.ClassLoader.loadClass (ClassLoader.java:511)
       at java.lang.ClassLoader.loadClass (ClassLoader.java:469)
       at android.app.ActivityThread.handleReceiver (ActivityThread.java:2708)

App编译sdk api为24,工具为Eclipse。它是基于 Cocos2d-x 版本的跨平台项目,版本是 2.2.6,我无法将它更新到最新版本的 cocos2d-x。我需要这个版本的解决方案。

最佳答案

我最近不得不处理同样的事情。问题是 Google Play 控制台显示 ANR 和崩溃的方式发生了变化。来自页面:

ANRs & crashes data source changed

This section shows all ANRs & crashes collected from Android devices whose users have reported individual crash and ANR events. As of 17 May 2017, the new section shows all ANRs & crashes collected from Android devices whose users have opted in to automatically share usage and diagnostics data and has a higher volume of reports. [Learn more] (link)

[View new ANRs & crashes] (link)

报告崩溃的用户将显示完整的内容。自动收集似乎删除了第一行左右。

有两种方法可以获取旧的(完整的)用户提交的报告:

1)找到之前版本的链接

这不是很明显,但在ANRs & crashes 部分的顶部,有文本

This section shows all ANRs & crashes collected from Android devices whose users have opted in to automatically share usage and diagnostics data. The [previous section](link) shows all ANRs & crashes collected from Android devices whose users have reported individual ANR & crash events and has a smaller volume of reports.

单击上一节 链接。您现在可以单击崩溃以获取完整的崩溃报告以及传递的用户消息。

2) 下载崩溃报告

  • 转到 Google Play 控制台主屏幕 ( https://play.google.com/apps/publish/?account=XXXX#AppListPlace )。
  • 在左侧,有“所有应用程序”、“游戏服务”等链接。点击“下载报告”链接
  • 如果您有多个应用,请点击“崩溃和 ANR”并选择您的应用
  • 您将看到一个屏幕,可让您下载崩溃报告的 CSV 文件。在里面,您会找到丢失的类名,以及带有完整堆栈跟踪的崩溃报告的链接

关于java - 找不到类异常 : Unknown Class Name,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46546030/

相关文章:

java - 非常奇怪的鼠标监听器和 If 语句

java - 创建字符串和数组

java - 无法让 JavaFX 在 Eclipse 中工作

java - Jquery数据属性解析json

java - 如何对html内容中的特殊字符进行编码

java - 显示 Java GUI 是否需要一些特殊处理?

java - SQLite 两张表,一张有效,另一张无效

java - 如何打印变量的类型 - 当变量为整数时出错

java - ListView 打开相同的 Activity

Android:ACTION_PACKAGE_FULLY_REMOVED 和 ACTION_PACKAGE_REMOVED 之间的区别