私は次の問題に直面した:私は、ドキュメントにこれらのメソッドについての情報を見つけることができませんでしたStrictMode AndroidBlockGuardPolicy.onReadFromDisk
1) logger = LoggerFactory.getLogger(name);
2) mMessagesJobManager = new JobManager(this, configuration);
3) Fabric.with(this, new Crashlytics());
:私は3ヶ所で、このエラーを得た
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)
。私は唯一の解決策を見つけた - AsyncTaskを使用するが、私はそれを修正する必要がありますか?はいの場合、なぜドキュメンテーションに情報が含まれていないのですか? よろしくお願いいたします。