首页 > 代码库 > 我用真机测试android,logcat输出停不下来,怎么回事
我用真机测试android,logcat输出停不下来,怎么回事
============问题描述============
貌似我在手机上做做得任何操作都输出到logcat上了,好像兼职在调试整个android系统了,根本停不下来,怎么破
如下,,,,是其中一段
10-06 23:13:56.055: D/BluetoothAdapter(2674): 1109355176: getState() : mService = null. Returning STATE_OFF
10-06 23:13:56.055: D/DisplayPowerController(2594): setBrightness mPendingRequestLocked.buttonBrightness = 61
10-06 23:13:56.075: D/RampAnimator(2594): animateTo reallyTarget is 1012rate is 25mode is 0
10-06 23:13:56.080: D/DisplayPowerController(2594): setBrightness mPendingRequestLocked.buttonBrightness = 61
10-06 23:13:56.080: D/PowerManagerService(2594): set home button brightness by screen_brightness = 112
10-06 23:13:56.270: V/AudioPolicyManager(2142): getDeviceForStrategy() from cache strategy 1, device 1
10-06 23:13:56.270: D/chenfang_volume(2594): getStreamVolume = 150
10-06 23:13:56.275: D/PowerManagerService(2594): set home button brightness by screen_brightness = 111
10-06 23:13:56.275: D/DisplayPowerController(2594): requestPowerState: screenState=2, useProximitySensor=false, screenBrightness=102, screenAutoBrightnessAdjustment=0.0, useAutoBrightness=true, blockScreenOn=false, buttonBrightness=60, adjustByUserInAutoBrightness=false, isTurnOnAction=true, waitForNegativeProximity=false
10-06 23:13:56.280: D/RampAnimator(2594): animateTo reallyTarget is 1012rate is 25mode is 0
10-06 23:13:56.280: D/DisplayPowerController(2594): setBrightness mPendingRequestLocked.buttonBrightness = 60
10-06 23:13:56.285: D/BluetoothAdapter(2674): 1109355176: getState() : mService = null. Returning STATE_OFF
10-06 23:13:56.290: D/RampAnimator(2594): animateTo reallyTarget is 1012rate is 25mode is 0
10-06 23:13:56.290: D/DisplayPowerController(2594): setBrightness mPendingRequestLocked.buttonBrightness = 60
10-06 23:13:56.290: D/PowerManagerService(2594): set home button brightness by screen_brightness = 111
10-06 23:13:56.500: V/AudioPolicyManager(2142): getDeviceForStrategy() from cache strategy 1, device 1
============解决方案1============
你是把log写在频繁调用的函数里了吧。
============解决方案2============
首先,你要排除机型问题,你现在虚拟机上试试,看看是否同样有问题.
如果还是有问题,那就检查一下自己初始化的逻辑,看你的 log 信息很多都是蓝牙,声音,电源之类的服务管理信息,;你是否有后台服务或者线程一直在轮询,处理他们
============解决方案3============
这些Log都是系统或者其他后台运行的app打印的,你可以自己添加一个Logcat Filter(根据Log Tag或者是Appliction Name来筛选Log)
我用真机测试android,logcat输出停不下来,怎么回事
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。