本文介绍了在LogCat中的Android的SensorManager错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我与传感器管理和错误,在logcat中的一个问题。当我注册该侦听器这一行:
I have a problem with the sensor manager and errors in the logcat.When I register the listener with this line :
sensorMgr.registerListener(this, sensorMgr.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), SensorManager.SENSOR_DELAY_NORMAL);
我收到论文在logcat的线有三个错误。
I recieve theses lines in the logcat with three errors.
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
它的伟大工程,是没有问题的,但我怎样才能避免这些错误?
It works great, there is no problem but how can I avoid these errors ?
PS:我不使用去precated版本
PS : I don't use the deprecated version.
推荐答案
这不是一个错误,这是一种正常的行为,他们将其标记为错误的错误。您可以在ICS的设备上运行它,看到了相同的日志行的调试日志型。
It's not an error, this is a normal behavior, they marked it as error by mistake. You can run it on an ICS device and see the same log line in a "debug" log-type.
这篇关于在LogCat中的Android的SensorManager错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!