Android应用因getMDCPropertyMap崩溃:NoClassDefFoundError

时间:2018-12-03 07:08:00

标签: android logback slf4j logback-classic

我的android应用程序崩溃了,并且某个用户的堆栈如下。

java.lang.NoClassDefFoundError: 
  at ch.qos.logback.classic.spi.LoggingEvent.getMDCPropertyMap (Unknown Source)
  at ch.qos.logback.classic.spi.LoggingEvent.prepareForDeferredProcessing (Unknown Source)
  at ch.qos.logback.core.OutputStreamAppender.subAppend (Unknown Source)
  at ch.qos.logback.core.FileAppender.subAppend (Unknown Source)
  at ch.qos.logback.core.OutputStreamAppender.append (Unknown Source)
  at ch.qos.logback.core.UnsynchronizedAppenderBase.doAppend (Unknown Source)
  at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders (Unknown Source)
  at ch.qos.logback.classic.Logger.appendLoopOnAppenders (Unknown Source)
  at ch.qos.logback.classic.Logger.callAppenders (Unknown Source)
  at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend (Unknown Source)
  at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus (Unknown Source)
  at ch.qos.logback.classic.Logger.info (Unknown Source)
  at com.my.app.ApplicationEx.onCreate (ApplicationEx.java:156)
  at android.app.Instrumentation.callApplicationOnCreate (Instrumentation.java:1014)
  at android.app.ActivityThread.handleBindApplication (ActivityThread.java:4753)
  at android.app.ActivityThread.access$1500 (ActivityThread.java:166)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1343)
  at android.os.Handler.dispatchMessage (Handler.java:102)
  at android.os.Looper.loop (Looper.java:136)
  at android.app.ActivityThread.main (ActivityThread.java:5590)
  at java.lang.reflect.Method.invokeNative (Native Method)
  at java.lang.reflect.Method.invoke (Method.java:515)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1268)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1084)
  at dalvik.system.NativeStart.main (Native Method)

此崩溃仅发生于单个用户(三星Galaxy Tab E 9.6(gtelwifi),Android 4.4)。这不会在其他设备上重现。

我使用slf4j登录我的android应用,这就是我导入日志库的方式。

implementation 'org.slf4j:slf4j-api:1.7.25'
implementation 'com.github.tony19:logback-android:1.3.0-2'

这次崩溃的原因可能是什么?

0 个答案:

没有答案