2

我收到异常" ThrottleService(79): problem reading network stats"
我不知道为什么这给了我异常,并且在应用程序中有一些与服务器的通信工作正常,但过去工作的 XMPP 数据包侦听器现在不工作。谁能告诉我出了什么问题?
请帮助我,在此先感谢。

XMPP 显示设备已登录并在服务器上在线。

我的环境:

服务器端 :

操作系统:Windows
XMPP 服务器:Openfire 3.7.1。
阿帕奇 tomcat 6
Java 6

客户端 :

Android 4.0.3
对于 XMPP 我正在使用 Smack 库

我该怎么办?我坚持这一点。

听到来自已弃用的 log-cat 的日志:---

11-23 11:46:11.932: WARN/ThrottleService(79): unable to find stats for iface rmnet0
11-23 11:46:11.932: WARN/ThrottleService(79): [ 11-23 11:47:58.421    79:0x74 F/NetworkStats ]
11-23 11:46:11.932: WARN/ThrottleService(79): problem reading network stats
11-23 11:46:11.932: WARN/ThrottleService(79): java.lang.IllegalStateException: problem parsing idx 1
11-23 11:46:11.932: WARN/ThrottleService(79):     at com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:300)
11-23 11:46:11.932: WARN/ThrottleService(79):     at com.android.server.NetworkManagementService.getNetworkStatsUidDetail(NetworkManagementService.java:1282)
11-23 11:46:11.932: WARN/ThrottleService(79):     at com.android.server.net.NetworkStatsService.performPollLocked(NetworkStatsService.java:831)
11-23 11:46:11.932: WARN/ThrottleService(79):     at com.android.server.net.NetworkStatsService.performPoll(NetworkStatsService.java:799)
11-23 11:46:11.932: WARN/ThrottleService(79):     at com.android.server.net.NetworkStatsService.access$100(NetworkStatsService.java:128)
11-23 11:46:11.932: WARN/ThrottleService(79):     at com.android.server.net.NetworkStatsService$3.onReceive(NetworkStatsService.java:633)
11-23 11:46:11.932: WARN/ThrottleService(79):     at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:728)
11-23 11:46:11.932: WARN/ThrottleService(79):     at android.os.Handler.handleCallback(Handler.java:605)
11-23 11:46:11.932: WARN/ThrottleService(79):     at android.os.Handler.dispatchMessage(Handler.java:92)
11-23 11:46:11.932: WARN/ThrottleService(79):     at android.os.Looper.loop(Looper.java:137)
11-23 11:46:11.932: WARN/ThrottleService(79):     at android.os.HandlerThread.run(HandlerThread.java:60)
11-23 11:46:11.932: WARN/ThrottleService(79): Caused by: java.io.FileNotFoundException: /proc/net/xt_qtaguid/stats: open failed: ENOENT (No such file or directory)
11-23 11:46:11.932: WARN/ThrottleService(79):     at libcore.io.IoBridge.open(IoBridge.java:406)
11-23 11:46:11.932: WARN/ThrottleService(79):     at java.io.FileInputStream.<init>(FileInputStream.java:78)
11-23 11:46:11.932: WARN/ThrottleService(79):     at com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:269)
11-23 11:46:11.932: WARN/ThrottleService(79):     ... 10 more
11-23 11:46:11.932: WARN/ThrottleService(79): Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory)
11-23 11:46:11.932: WARN/ThrottleService(79):     at libcore.io.Posix.open(Native Method)
11-23 11:46:11.932: WARN/ThrottleService(79):     at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
11-23 11:46:11.932: WARN/ThrottleService(79):     at libcore.io.IoBridge.open(IoBridge.java:390)
11-23 11:46:11.932: WARN/ThrottleService(79):     ... 12 more
4

1 回答 1

7

当我不小心从清单中删除以下行时,这发生在我身上:

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

一旦我把它加回去,一切就恢复正常了。

我希望这有帮助。

于 2012-11-29T18:49:56.927 回答