我的传感器管理器有问题,logcat中有错误.
当我在此行注册监听器时:
sensorMgr.registerListener(this, sensorMgr.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), SensorManager.SENSOR_DELAY_NORMAL);
我在logcat中收到这些错误行,其中包含三个错误.
06-07 20:52:42.419: D/SensorManager(9215): ====>>>>>Num Sensor: 1
06-07 20:52:42.419: D/SensorManager(9215): ====>>>>>Num Sensor: 2
06-07 20:52:42.419: D/SensorManager(9215): ====>>>>>Num Sensor: 3
06-07 20:52:42.419: D/SensorManager(9215): ====>>>>>Num Sensor: 4
06-07 20:52:42.419: D/SensorManager(9215): ====>>>>>Num Sensor: 5
06-07 20:52:42.419: D/SensorManager(9215): ====>>>>>Num Sensor: 6
06-07 20:52:42.419: D/SensorManager(9215): ====>>>>>Num Sensor: 0
06-07 20:52:42.419: E/SensorManager(9215): registerListener :: handle = 0 name= BMA220 delay= 200000 Listener= fr.rocknscrum.liseronmobile.MainActivity@40520980
06-07 20:52:42.419: E/SensorManager(9215): =======>>>Sensor Thread RUNNING <<<========
06-07 20:52:42.429: E/SensorManager(9215): reg :: handle = 0
效果很好,没有问题,但是如何避免这些错误?
PS:我不使用不推荐使用的版本.
解决方法:
这不是错误,这是正常现象,他们将其错误地标记为错误.您可以在ICS设备上运行它,并在“调试”日志类型中看到相同的日志行.