0

在我的应用程序中,单击按钮时,以异步任务从 Web 服务器下载一些内容。一切都很好,但是当我观察 DDMS 时,发现日志消息重复多次。是 DDMS 的问题还是多个进程在后台运行。

如果是我的问题,如何确定有多少进程在后台运行?

05-09 16:37:39.673: VERBOSE/DownloadManager(12184): DE: Size - 4
05-09 16:37:39.673: VERBOSE/DownloadManager(12184): DE: Size - 4
05-09 16:37:39.673: VERBOSE/DownloadManager(12184): DE: Size - 4
05-09 16:37:39.673: VERBOSE/DownloadManager(12184): DE: Size - 4
05-09 16:37:39.692: VERBOSE/DownloadManager(12184): DE.1.zip
05-09 16:37:39.692: VERBOSE/DownloadManager(12184): DE.1.zip
05-09 16:37:39.692: VERBOSE/DownloadManager(12184): DE.1.zip
05-09 16:37:39.692: VERBOSE/DownloadManager(12184): DE.1.zip
05-09 16:38:38.933: VERBOSE/DownloadManager(12184): DEAfter Compress
05-09 16:38:38.933: VERBOSE/DownloadManager(12184): DEAfter Compress
05-09 16:38:38.933: VERBOSE/DownloadManager(12184): DEAfter Compress
05-09 16:38:38.933: VERBOSE/DownloadManager(12184): DEAfter Compress
05-09 16:38:39.004: VERBOSE/DownloadManager(12184): DE.2.zip
05-09 16:38:39.004: VERBOSE/DownloadManager(12184): DE.2.zip
05-09 16:38:39.004: VERBOSE/DownloadManager(12184): DE.2.zip
05-09 16:38:39.004: VERBOSE/DownloadManager(12184): DE.2.zip
05-09 16:38:52.493: VERBOSE/DownloadManager(12184): XX: Size - 4
05-09 16:38:52.493: VERBOSE/DownloadManager(12184): XX: Size - 4
05-09 16:38:52.493: VERBOSE/DownloadManager(12184): XX: Size - 4
05-09 16:38:52.493: VERBOSE/DownloadManager(12184): XX: Size - 4
05-09 16:38:52.557: VERBOSE/DownloadManager(12184): XX.1.zip
05-09 16:38:52.557: VERBOSE/DownloadManager(12184): XX.1.zip
05-09 16:38:52.557: VERBOSE/DownloadManager(12184): XX.1.zip
05-09 16:38:52.557: VERBOSE/DownloadManager(12184): XX.1.zip
05-09 16:39:53.844: VERBOSE/DownloadManager(12184): DEAfter Compress
05-09 16:39:53.844: VERBOSE/DownloadManager(12184): DEAfter Compress

问候, 斯里尼瓦斯

4

2 回答 2

1

这是从 eclipse logcat 屏幕复制和粘贴的吗?如果是这样,简单的解决方法是重新启动 eclipse。然后,日志消息将自行正确显示。

您的进程只运行一次,这是实际日志记录的问题。当您重新启动应用程序时会发生这种情况。

于 2011-05-09T12:46:11.710 回答
0

使用 adb 连接到您的手机/模拟器,然后运行“ps -A”以获取进程列表

于 2011-05-09T12:29:07.527 回答