我面臨的下一個問題:StrictMode AndroidBlockGuardPolicy.onReadFromDisk
StrictMode policy violation; ~duration=2235 ms: android.os.StrictMode$StrictModeDiskReadViolation: policy=65567 violation=2
at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1278)
at libcore.io.BlockGuardOs.lseek(BlockGuardOs.java:162)
at java.io.RandomAccessFile.seek(RandomAccessFile.java:603)
at java.util.zip.Zip64.parseZip64EocdRecordLocator(Zip64.java:98)
at java.util.zip.ZipFile.readCentralDir(ZipFile.java:419)
at java.util.zip.ZipFile.<init>(ZipFile.java:175)
at java.util.zip.ZipFile.<init>(ZipFile.java:131)
at dalvik.system.DexPathList$Element.maybeInit(DexPathList.java:452)
at dalvik.system.DexPathList$Element.findResource(DexPathList.java:499)
at dalvik.system.DexPathList.findResource(DexPathList.java:360)
at dalvik.system.BaseDexClassLoader.findResource(BaseDexClassLoader.java:67)
at java.lang.ClassLoader.getResource(ClassLoader.java:403)
at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:442)
at ch.qos.logback.classic.util.ContextInitializer.getResource(Unknown Source)
at ch.qos.logback.classic.util.ContextInitializer.findConfigFileURLFromAssets(Unknown Source)
at ch.qos.logback.classic.util.ContextInitializer.autoConfig(Unknown Source)
at org.slf4j.impl.StaticLoggerBinder.init(Unknown Source)
at org.slf4j.impl.StaticLoggerBinder.<clinit>(Unknown Source)
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
at com.my.utils.x.c(LogUtils.java:164)
at com.my.utils.x.b(LogUtils.java:65)
at com.my.Application.onCreate(Application.java:148)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1018)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4970)
at android.app.ActivityThread.-wrap1(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1560)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:5765)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
我在3個地方得到這個錯誤:
1) logger = LoggerFactory.getLogger(name);
2) mMessagesJobManager = new JobManager(this, configuration);
3) Fabric.with(this, new Crashlytics());
我沒有找到有關文檔這些方法的任何信息。我發現只有一個解決方案 - 使用AsyncTask,但我應該修復它?如果是,爲什麼文檔不包含任何關於它的信息? 此致敬禮。