本文介绍了Android应用程序提供了错误" BatteryStatsImpl:阅读网统计"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在我从URL下载图像,并显示在列表视图他们。我曾下文称懒惰名单库在github上这一点。

Right now I am downloading the images from URL and showing them in List View. I have reffered Lazy List library on github for this.

我的应用程序一段时间后,工作fine.But我得到了以下的logcat的错误:

My application is working fine.But after some time I got following error in logcat:

03-05 12:18:42.955: A/NetworkStats(12320): problem reading network stats
03-05 12:18:42.955: A/NetworkStats(12320): java.lang.IllegalStateException: problem parsing idx 1
03-05 12:18:42.955: A/NetworkStats(12320):  at com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:300)
03-05 12:18:42.955: A/NetworkStats(12320):  at com.android.server.NetworkManagementService.getNetworkStatsUidDetail(NetworkManagementService.java:1282)
03-05 12:18:42.955: A/NetworkStats(12320):  at com.android.server.net.NetworkStatsService.performPollLocked(NetworkStatsService.java:831)
03-05 12:18:42.955: A/NetworkStats(12320):  at com.android.server.net.NetworkStatsService.performPoll(NetworkStatsService.java:799)
03-05 12:18:42.955: A/NetworkStats(12320):  at com.android.server.net.NetworkStatsService.access$100(NetworkStatsService.java:128)
03-05 12:18:42.955: A/NetworkStats(12320):  at com.android.server.net.NetworkStatsService$3.onReceive(NetworkStatsService.java:633)
03-05 12:18:42.955: A/NetworkStats(12320):  at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:728)
03-05 12:18:42.955: A/NetworkStats(12320):  at android.os.Handler.handleCallback(Handler.java:605)
03-05 12:18:42.955: A/NetworkStats(12320):  at android.os.Handler.dispatchMessage(Handler.java:92)
03-05 12:18:42.955: A/NetworkStats(12320):  at android.os.Looper.loop(Looper.java:137)
03-05 12:18:42.955: A/NetworkStats(12320):  at android.os.HandlerThread.run(HandlerThread.java:60)
03-05 12:18:42.955: A/NetworkStats(12320): Caused by: java.io.FileNotFoundException: /proc/net/xt_qtaguid/stats: open failed: ENOENT (No such file or directory)
03-05 12:18:42.955: A/NetworkStats(12320):  at libcore.io.IoBridge.open(IoBridge.java:406)
03-05 12:18:42.955: A/NetworkStats(12320):  at java.io.FileInputStream.<init>(FileInputStream.java:78)
03-05 12:18:42.955: A/NetworkStats(12320):  at com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:269)
03-05 12:18:42.955: A/NetworkStats(12320):  ... 10 more
03-05 12:18:42.955: A/NetworkStats(12320): Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory)
03-05 12:18:42.955: A/NetworkStats(12320):  at libcore.io.Posix.open(Native Method)
03-05 12:18:42.955: A/NetworkStats(12320):  at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
03-05 12:18:42.955: A/NetworkStats(12320):  at libcore.io.IoBridge.open(IoBridge.java:390)
03-05 12:18:42.955: A/NetworkStats(12320):  ... 12 more

每2-3 min.My应用程序工作正常后,来此错误。

This error come after every 2-3 min.My application is working fine.

推荐答案

这是不是你的应用程序的问题。我猜你在哪里增加了对网络统计数据的支持(API> 12)一个模拟器测试应用程序。但是仿真器依赖于旧内核版本(2.6.x的),即不具有模块,以提供网络统计信息。因此,Android的网络统计服务无法打开文件的/ proc /净/ xt_qtaguid /统计其中,由内核模块收集的数据进行采集。因此,您获得这些奇怪的错误。

This is not the problem of your application. I guess that you test your application on a emulator where the support for network statistics was added (API > 12). But emulator relies on an old kernel version (2.6.x), that does not have a module to provide network statistics information. Thus, Android Network Statistics service cannot open file /proc/net/xt_qtaguid/stats where the statistics gathered by kernel module is collected. Therefore, you obtain these weird errors.

此外,您还可以阅读this的回答。

Also, you can read this answer.

这篇关于Android应用程序提供了错误&QUOT; BatteryStatsImpl:阅读网统计&QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 01:06