我面临下一个问题:@H_404_1@
@H_404_1@
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个地方收到此错误:@H_404_1@
@H_404_1@
1) logger = LoggerFactory.getLogger(name);2) mMessagesJobManager = new JobManager(this, configuration);3) Fabric.with(this, new Crashlytics());
我在文档中找不到有关这些方法的任何信息.我只找到一种解决方案-使用AsyncTask,但是我应该解决它吗?如果是,为什么文档中不包含任何信息?
最好的祝福.@H_404_1@
解决方法:@H_404_1@
I dIDn’t find any info about these methods in documentation@H_404_1@
这是因为它们都不是AndroID的一部分.据推测,它们来自您添加到应用程序的库(slf4j,Fabric,我猜可能是Firebase).@H_404_1@
@H_404_1@
I found only one solution – use AsyncTask, but should I fix it?@H_404_1@
好吧,您的应用程序崩溃了.如果您想发布此应用,则需要做一些事情以防止崩溃.@H_404_1@
在您的代码中,您将StrictMode配置为对磁盘读取应用刑罚().因此,您的选择是:@H_404_1@
>将该磁盘I / O从主应用程序线程中移出,这通常是最好的解决方案,尽管它可能不切实际(假设您不控制库的实现)
>停止将StrictMode配置为对磁盘读取应用惩罚Death().@H_404_1@
If yes, why documentation doesn’t contain any info about it?@H_404_1@
如果您的意思是documentation on StrictMode
.除此之外,我想Google希望专业的应用程序开发人员可以阅读文档,学习课程或寻找其他方法来学习AndroID应用程序开发,而本文档没有直接介绍这些内容.@H_404_1@@H_404_1@ 总结
以上是内存溢出为你收集整理的StrictMode AndroidBlockGuardPolicy.onReadFromDisk全部内容,希望文章能够帮你解决StrictMode AndroidBlockGuardPolicy.onReadFromDisk所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)