开发者

Logcat errors when running android emulator

I'm running an emulator targeting 2.3 (API Level 9). I've removed all downloaded apps (which includes any code that I've written) but I still get all of these logcat errors when I start up the emulator:

[ollie@devdataload scripts]$ startlogcat.sh 
- waiting for device -
E/Zygote  (   32): setreuid() failed. errno: 2
E/Zygote  (   32): setreuid() failed. errno: 17
E/BatteryService(   61): usbOnlinePath not found
E/BatteryService(   61): batteryVoltagePath not found
E/BatteryService(   61): batteryTemperaturePath not found
E/SurfaceFlinger(   61): Couldn't open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake
E/SensorService(   61): couldn't open device for module sensors (Invalid argument)
E/System  (   61): Failure starting core service
E/System  (   61): java.lang.SecurityException
E/System  (   61):      at android.os.BinderProxy.transact(Native Method)
E/System  (   61):      at android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146)
E/System  (   61):      at android.os.ServiceManager.addService(ServiceManager.java:72)
E/System  (   61):      at com.android.server.ServerThread.run(SystemServer.java:206)
E/EventHub(   61): could not get driver version for /dev/input/mouse0, Not a typewriter
E/EventHub(   61): could not get driver version for /dev/input/mice, Not a typewriter
E/SoundPool(   61): error loading /system开发者_Go百科/media/audio/ui/Effect_Tick.ogg
E/SoundPool(   61): error loading /system/media/audio/ui/KeypressStandard.ogg
E/SoundPool(   61): error loading /system/media/audio/ui/KeypressSpacebar.ogg
E/SoundPool(   61): error loading /system/media/audio/ui/KeypressDelete.ogg
E/SoundPool(   61): error loading /system/media/audio/ui/KeypressReturn.ogg
E/UsbObserver(   61): 
E/UsbObserver(   61): java.lang.NullPointerException
E/UsbObserver(   61):   at com.android.server.UsbObserver.init(UsbObserver.java:131)
E/UsbObserver(   61):   at com.android.server.UsbObserver.<init>(UsbObserver.java:65)
E/UsbObserver(   61):   at com.android.server.ServerThread.run(SystemServer.java:402)
E/ThrottleService(   61): Could not open GPS configuration file /etc/gps.conf
E/logwrapper(  125): executing /system/bin/tc failed: No such file or directory
E/logwrapper(  126): executing /system/bin/tc failed: No such file or directory
E/logwrapper(  127): executing /system/bin/tc failed: No such file or directory

I'd like to try to clean these up so that I can know for sure that any errors I'm looking at are being caused by my code. Does anyone else get these error messages and do you fix them or just ignore them?


If they don't deal with your application, you can ignore them. There is nothing you can do as a developer to fix a manufacturer problem on other peoples phones or even yours for that matter (well short of a custom rom).

Edit: I'd also add that some errors/warnings are normal and are not to be of concern.


Common logging practice in Android is smth like:

public class MyClass
{
    public static final String TAG=MyClass.class.getName();

    // some stuff

    Log.i(TAG, "My log message");
}

So when you're inspecting LogCat messages you can filter your logs using those TAG. This is way to ignore other logs.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜