找不到方法执行/NoClassDefFoundError(对于外部库),但不是在所有设备上 [英] Could not find method excpetion / NoClassDefFoundError (for external library) BUT not on all devices

查看:112
本文介绍了找不到方法执行/NoClassDefFoundError(对于外部库),但不是在所有设备上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了如下异常:

07-26 10:17:25.991 I/dalvikvm(20751): Could not find method org.slf4j.LoggerFactory.getILoggerFactory, referenced from method com.app.androknife2.utils.L.init
07-26 10:17:25.991 W/dalvikvm(20751): VFY: unable to resolve static method 63525: Lorg/slf4j/LoggerFactory;.getILoggerFactory ()Lorg/slf4j/ILoggerFactory;
07-26 10:17:26.011 E/AndroidRuntime(20751): FATAL EXCEPTION: main
07-26 10:17:26.011 E/AndroidRuntime(20751): Process: com.app.gallery.premium, PID: 20751
07-26 10:17:26.011 E/AndroidRuntime(20751): java.lang.NoClassDefFoundError: org.slf4j.LoggerFactory
07-26 10:17:26.011 E/AndroidRuntime(20751):     at com.app.androknife2.utils.L.d(L.java:165)
07-26 10:17:26.011 E/AndroidRuntime(20751):     at com.app.androknife2.baseClasses.BaseApp$1.d(BaseApp.java:51)
...

奇怪的是,此应用程序作为beta版应用程序在Play商店中存在,并且适用于所有人,但是一个测试人员在启动该应用程序后会立即遇到此异常(第一次登录尝试因上述异常而失败)

The weird thing is, this app is in the play store as a beta app and is working for everyone, but one tester get's this exception, as soon as he start the app (the first log try fails with the above exception).

任何想法,根本原因是什么? slf4j库包含在我的代码中,因此,如果我在保护它时出错了,就我所知,它会在所有设备上失败...

Any idea, what could be the root cause? The slf4j library is packed into my code, so if I made something wrong proguarding it, it would fail on all devices as far as I understand that...

有什么想法,提示或类似内容吗?

推荐答案

您似乎已到达65k method limit.

尝试添加此行:

android:name="android.support.multidex.MultiDexApplication"

application tag内的AndroidManifest

请注意,您也可以通过编程方式避免这种情况: 有关更多详细信息,请参考具有64K以上方法的应用

Note that you can avoid this programatically also: Refer to Apps with Over 64K Methods for more details

这篇关于找不到方法执行/NoClassDefFoundError(对于外部库),但不是在所有设备上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆