在LogCat中的Andr​​oid的SensorManager错误错误、Andr、LogCat、SensorManager

2023-09-07 15:57:13 作者:孤独的造梦者

我与传感器管理和错误,在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.