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/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.
Related
Create empty project in unity. Compile it to APK. When try to start : "Unfortunately (app) has stopped"
Device Filter : "FAT (ARMv7 + x86)"
Here is a logcat:
--------- beginning of /dev/log/system
E/VoldConnector( 652): NDC Command {468 asec create smdl2tmp1 45 ext4 [scrubbed] 10005 1} took too long (8857ms)
E/VoldConnector( 652): NDC Command {470 asec finalize smdl2tmp1} took too long (669ms)
--------- beginning of /dev/log/main
E/rsC++ (23278): RS Message thread exiting.
E/Finsky (29234): [1] com.google.android.finsky.wear.bl.a(3): onConnectionFailed: ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null, message=null}
E/ (23278): appName=com.android.launcher3, acAppName=/system/bin/surfaceflinger
E/ (23278): 0
E/ ( 652): Could not open '/data/data/hotplug/cmd'
E/ ( 652): error : 2, No such file or directory
E/AuthorizationBluetoothService( 908): Proximity feature is not enabled.
E/AuthorizationBluetoothService( 908): Proximity feature is not enabled.
E/dalvikvm(30687): Could not find class 'android.telecom.TelecomManager', referenced from method com.google.android.gms.wearable.service.y.a
E/AuthorizationBluetoothService( 908): Proximity feature is not enabled.
E/dalvikvm(30621): Could not find class 'android.app.usage.UsageStatsManager', referenced from method com.google.android.gms.lockbox.LockboxService.a
E/MDM ( 809): [52] b.run: Couldn't connect to Google API client: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null}
E/MDM ( 809): [66] b.run: Couldn't connect to Google API client: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null}
E/MDM ( 809): [66] b.run: Couldn't connect to Google API client: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null}
E/CellLocation( 809): create GsmCellLocation
E/CellLocation( 809): create GsmCellLocation
E/CellLocation( 809): create GsmCellLocation
E/cutils-trace(30720): Error opening trace file: No such file or directory (2)
E/memtrack(30720): Couldn't load memtrack module (No such file or directory)
E/android.os.Debug(30720): failed to load memtrack module: -2
E/VoldConnector( 652): NDC Command {482 asec create smdl2tmp1 45 ext4 [scrubbed] 10005 1} took too long (8436ms)
E/VoldConnector( 652): NDC Command {484 asec finalize smdl2tmp1} took too long (2238ms)
E/ ( 652): Could not open '/data/data/hotplug/cmd'
E/ ( 652): error : 2, No such file or directory
E/installd( 154): prepare_ext cache dir /mnt/sdcard/dalvik-cache/ fail: File exists
E/installd( 154): cannot chmod '/mnt/sdcard/dalvik-cache/mnt#asec#com.a.b-1#pkg.apk#classes.dex' : Operation not permitted
E/jdwp (30720): jdwp::setsockopt(SO_SNDTIMEO)
E/jdwp (30720): jdwp::setsockopt(SO_RCVTIMEO)
E/Finsky (29234): [1] com.google.android.finsky.wear.bl.a(3): onConnectionFailed: ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null, message=null}
E/AuthorizationBluetoothService( 908): Proximity feature is not enabled.
E/AuthorizationBluetoothService( 908): Proximity feature is not enabled.
E/dalvikvm(30869): Could not find class 'android.telecom.TelecomManager', referenced from method com.google.android.gms.wearable.service.y.a
E/MDM ( 809): [52] b.run: Couldn't connect to Google API client: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null}
E/MDM ( 809): [52] b.run: Couldn't connect to Google API client: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null}
04-21 02:27:40.341: E/vold(27): Error opening switch name path '/sys/class/switch/test2' (No such file or directory)
04-21 02:27:40.341: E/vold(27): Error bootstrapping switch '/sys/class/switch/test2' (No such file or directory)
04-21 02:27:40.341: E/vold(27): Error opening switch name path '/sys/class/switch/test' (No such file or directory)
04-21 02:27:40.341: E/vold(27): Error bootstrapping switch '/sys/class/switch/test' (No such file or directory)
04-21 02:27:49.111: E/BatteryService(52): usbOnlinePath not found
04-21 02:27:49.111: E/BatteryService(52): batteryVoltagePath not found
04-21 02:27:49.111: E/BatteryService(52): batteryTemperaturePath not found
04-21 02:27:49.111: E/SurfaceFlinger(52): Couldn't open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake
04-21 02:27:52.211: E/EventHub(52): could not get driver version for /dev/input/mouse0, Not a typewriter
04-21 02:27:52.211: E/EventHub(52): could not get driver version for /dev/input/mice, Not a typewriter
04-21 02:27:53.231: E/System(52): Failure starting core service
04-21 02:27:53.231: E/System(52): java.lang.SecurityException
04-21 02:27:53.231: E/System(52): at android.os.BinderProxy.transact(Native Method)
04-21 02:27:53.231: E/System(52): at android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146)
04-21 02:27:53.231: E/System(52): at android.os.ServiceManager.addService(ServiceManager.java:72)
04-21 02:27:53.231: E/System(52): at com.android.server.ServerThread.run(SystemServer.java:176)
04-21 02:27:53.251: E/AndroidRuntime(52): Crash logging skipped, no checkin service
04-21 02:28:01.915: E/ActivityThread(102): Failed to find provider info for android.server.checkin
04-21 02:28:03.255: E/ActivityThread(102): Failed to find provider info for android.server.checkin
04-21 02:28:03.325: E/ActivityThread(102): Failed to find provider info for android.server.checkin
04-21 02:28:05.265: E/MediaPlayerService(31): Couldn't open fd for content://settings/system/notification_sound
04-21 02:28:05.295: E/MediaPlayer(52): Unable to to create media player
04-21 02:28:13.005: E/AndroidRuntime(131): ERROR: thread attach failed
04-21 02:28:14.785: E/AndroidRuntime(210): ERROR: thread attach failed
04-21 02:28:14.975: E/jdwp(222): Failed sending req to debugger: Broken pipe (-1 of 27)
04-21 02:28:14.975: E/jdwp(222): Failed sending req to debugger: Broken pipe (-1 of 27)
04-21 02:28:14.975: E/jdwp(222): Failed sending reply to debugger: Broken pipe
I think the problem is in your native function signature. You should decare it with JNIEXPORT and JNICALL.
Use the javah tool for generating header and source files.
Here is example: JNI Example
And next time try to find some related answers like java-lang-unsatisfiedlinkerror before asking another question.
I've been having problems with displaying Contacts in an AlertDialog, and I think I've found the
problem, but am still confused. The pertinent suspect part of my code is:
SimpleCursorAdapter mAdapter = new SimpleCursorAdapter(this,
android.R.layout.simple_list_item_1, mContacts,
new String[] { ContactsContract.Contacts.DISPLAY_NAME },
new int[] { android.R.id.text1 });
...Now "simple_list_item_1" is accepted by the compiler (the app runs in the Emulator), however when
I try to run this ListActivity, it bombs.
So after reading elsewhere about how to accomplish this task my eyes lit upon the aforepasted
"simple_list_item_1" - where is that? I didn't create any simple_list_item_1.xml file, and it doesn't exist in my \res\layout folder. So I (in Eclipse) right-clicked "simple_list_item_1" and selected "Open Declaration" and it invoked an err msg much or exactly like the one I see in the Debug Perspective about "Class File Editor | Source nout found | The JAR file ....\android.jar has no source attachment."
So...assuming this is the problem (there is no "simple_list_item_1.xml" in my \res\layout folder), what exactly is expected in this file (which I assume is simply a xml definition of what I want each Contact to display in)?
==============
Here is some LogCat data:
Here are the last lines in LogCat (it seems to die/hang once it gets to the ListActivity (ContactsActivity):
com.aXX3AndSpace.KeepInTouch/.KeepInTouchActivity: +5s368ms
01-08 21:54:34.020: I/ActivityManager(61): Starting: Intent { cmp=com.aXX3AndSpace.KeepInTouch/.ContactsActivity } from pid 385
...and here are all of the Error msgs in one attempted run (open the app, try to invoke the ListActivity). Note the "THIS SHOULD NEVER occur" msg at the end:
01-08 21:53:36.592: E/Zygote(33): setreuid() failed. errno: 2
01-08 21:53:46.423: E/Zygote(33): setreuid() failed. errno: 17
01-08 21:53:47.842: E/BatteryService(61): usbOnlinePath not found
01-08 21:53:47.842: E/BatteryService(61): batteryVoltagePath not found
01-08 21:53:47.842: E/BatteryService(61): batteryTemperaturePath not found
01-08 21:53:47.862: E/SurfaceFlinger(61): Couldn't open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake
01-08 21:53:48.082: E/SensorService(61): couldn't open device for module sensors (Invalid argument)
01-08 21:53:53.722: E/System(61): Failure starting core service
01-08 21:53:53.722: E/System(61): java.lang.SecurityException
01-08 21:53:53.722: E/System(61): at android.os.BinderProxy.transact(Native Method)
01-08 21:53:53.722: E/System(61): at android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146)
01-08 21:53:53.722: E/System(61): at android.os.ServiceManager.addService(ServiceManager.java:72)
01-08 21:53:53.722: E/System(61): at com.android.server.ServerThread.run(SystemServer.java:207)
01-08 21:53:53.742: E/EventHub(61): could not get driver version for /dev/input/mouse0, Not a typewriter
01-08 21:53:53.742: E/EventHub(61): could not get driver version for /dev/input/mice, Not a typewriter
01-08 21:53:54.032: E/SoundPool(61): error loading /system/media/audio/ui/Effect_Tick.ogg
01-08 21:53:54.032: E/SoundPool(61): error loading /system/media/audio/ui/KeypressStandard.ogg
01-08 21:53:54.032: E/SoundPool(61): error loading /system/media/audio/ui/KeypressSpacebar.ogg
01-08 21:53:54.042: E/SoundPool(61): error loading /system/media/audio/ui/KeypressDelete.ogg
01-08 21:53:54.042: E/SoundPool(61): error loading /system/media/audio/ui/KeypressReturn.ogg
01-08 21:53:54.703: E/ThrottleService(61): Could not open GPS configuration file /etc/gps.conf
01-08 21:53:57.172: E/logwrapper(158): executing /system/bin/tc failed: No such file or directory
01-08 21:53:57.242: E/logwrapper(159): executing /system/bin/tc failed: No such file or directory
01-08 21:53:57.282: E/logwrapper(160): executing /system/bin/tc failed: No such file or directory
01-08 21:54:00.074: E/jdwp(174): Failed sending reply to debugger: Broken pipe
01-08 21:54:00.712: E/Database(116): sqlite_config failed error_code = 21. THIS SHOULD NEVER occur.
simple_list_item_1 is a standard layout defined in the SDK, it's basically just a TextView with the id "android:id/text1", which is what you supply in your view identifiers.
Do you have the stacktrace of the crash? Because it's most likely not due to a missing simple_list_item_1 layout.
Create a new XML layout file using Eclipse wizard. The name of this file will replace simple_list_item_1 in your code:
In this layout, create a TextView (or any other container) element and call it text1:
Then SimpleCursorAdaptor will match your contact info and the text1 field in your layout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:id="#+id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView" />
I've created an AVD (version 2.2) using preferences set as default.
However everytime I start it I got error messages list below:
12-26 16:19:07.566: ERROR/Zygote(33): setreuid() failed. errno: 2
12-26 16:19:15.707: ERROR/Zygote(33): setreuid() failed. errno: 17
12-26 16:19:17.635: ERROR/BatteryService(87): usbOnlinePath not found
12-26 16:19:17.635: ERROR/BatteryService(87): batteryVoltagePath not found
12-26 16:19:17.645: ERROR/BatteryService(87): batteryTemperaturePath not found
12-26 16:19:17.695: ERROR/SurfaceFlinger(87): Couldn't open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake
12-26 16:19:48.305: ERROR/EventHub(87): could not get driver version for /dev/input/mouse0, Not a typewriter
12-26 16:19:48.305: ERROR/EventHub(87): could not get driver version for /dev/input/mice, Not a typewriter
12-26 16:19:48.495: ERROR/System(87): Failure starting core service
12-26 16:19:48.495: ERROR/System(87): java.lang.SecurityException
12-26 16:19:48.495: ERROR/System(87): at android.os.BinderProxy.transact(Native Method)
12-26 16:19:48.495: ERROR/System(87): at android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146)
12-26 16:19:48.495: ERROR/System(87): at android.os.ServiceManager.addService(ServiceManager.java:72)
12-26 16:19:48.495: ERROR/System(87): at com.android.server.ServerThread.run(SystemServer.java:184)
12-26 16:19:49.675: ERROR/SoundPool(87): error loading /system/media/audio/ui/Effect_Tick.ogg
12-26 16:19:49.685: ERROR/SoundPool(87): error loading /system/media/audio/ui/KeypressStandard.ogg
12-26 16:19:49.705: ERROR/SoundPool(87): error loading /system/media/audio/ui/KeypressSpacebar.ogg
12-26 16:19:49.716: ERROR/SoundPool(87): error loading /system/media/audio/ui/KeypressDelete.ogg
12-26 16:19:49.725: ERROR/SoundPool(87): error loading /system/media/audio/ui/KeypressReturn.ogg
12-26 16:19:54.736: ERROR/ThrottleService(87): Could not open GPS configuration file /etc/gps.conf
12-26 16:19:54.836: ERROR/ThrottleService(87): Error reading data file
12-26 16:19:55.816: ERROR/logwrapper(186): executing /system/bin/tc failed: No such file or directory
12-26 16:19:55.916: ERROR/logwrapper(188): executing /system/bin/tc failed: No such file or directory
12-26 16:19:55.995: ERROR/logwrapper(190): executing /system/bin/tc failed: No such file or directory
12-26 16:20:02.135: ERROR/logwrapper(202): executing /system/bin/tc failed: No such file or directory
12-26 16:20:02.245: ERROR/logwrapper(203): executing /system/bin/tc failed: No such file or directory
12-26 16:20:02.295: ERROR/logwrapper(204): executing /system/bin/tc failed: No such file or directory
12-27 00:20:16.924: ERROR/HierarchicalStateMachine(87): TetherMaster - unhandledMessage: msg.what=3
12-27 00:20:17.174: ERROR/HierarchicalStateMachine(87): TetherMaster - unhandledMessage: msg.what=3
12-27 00:20:21.224: ERROR/HierarchicalStateMachine(87): TetherMaster - unhandledMessage: msg.what=3
12-27 00:20:47.534: ERROR/MetadataRetrieverClient(34): failed to extract an album art
12-27 00:21:24.814: ERROR/ThrottleService(87): Error reading data file
Please let me know how can I fix these errors. Thanks a lot!
Unless you are experiencing actual problems, you can ignore error messages that occur during the startup of your emulator.
07-03 23:59:01.067: ERROR/vold(26): Error opening switch name path '/sys/class/switch/test' (No such file or directory)
07-03 23:59:01.067: ERROR/vold(26): Error bootstrapping switch '/sys/class/switch/test' (No such file or directory)
07-03 23:59:01.067: ERROR/vold(26): Error opening switch name path '/sys/class/switch/test2' (No such file or directory)
07-03 23:59:01.067: ERROR/vold(26): Error bootstrapping switch '/sys/class/switch/test2' (No such file or directory)
07-03 23:59:28.297: ERROR/BatteryService(60): usbOnlinePath not found
07-03 23:59:28.307: ERROR/BatteryService(60): batteryVoltagePath not found
07-03 23:59:28.307: ERROR/BatteryService(60): batteryTemperaturePath not found
07-03 23:59:28.407: ERROR/SurfaceFlinger(60): Couldn't open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake
07-03 23:59:39.097: ERROR/EventHub(60): could not get driver version for /dev/input/mouse0, Not a typewriter
07-03 23:59:39.137: ERROR/EventHub(60): could not get driver version for /dev/input/mice, Not a typewriter
07-03 23:59:39.777: ERROR/System(60): Failure starting core service
07-03 23:59:39.777: ERROR/System(60): java.lang.SecurityException
07-03 23:59:39.777: ERROR/System(60): at android.os.BinderProxy.transact(Native Method)
07-03 23:59:39.777: ERROR/System(60): at android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146)
07-03 23:59:39.777: ERROR/System(60): at android.os.ServiceManager.addService(ServiceManager.java:72)
07-03 23:59:39.777: ERROR/System(60): at com.android.server.ServerThread.run(SystemServer.java:176)
07-03 23:59:39.837: ERROR/AndroidRuntime(60): Crash logging skipped, no checkin service
07-04 00:00:00.400: ERROR/vold(26): Cannot start volume '/sdcard' (volume is not bound)
07-04 00:00:01.147: ERROR/MediaPlayerService(30): Couldn't open fd for content://settings/system/notification_sound
07-04 00:00:01.227: ERROR/MediaPlayer(60): Unable to to create media player
07-04 00:00:06.315: ERROR/ActivityThread(104): Failed to find provider info for android.server.checkin
07-04 00:00:11.615: ERROR/ActivityThread(104): Failed to find provider info for android.server.checkin
07-04 00:00:12.124: ERROR/ActivityThread(104): Failed to find provider info for android.server.checkin
07-04 00:00:35.335: ERROR/AndroidRuntime(126): ERROR: thread attach failed
07-04 00:00:42.835: ERROR/AndroidRuntime(211): ERROR: thread attach failed
I'm assuming that you're working on Android, and that you're also referring to the exception in the middle of the log.
The SecurityException means you probably forgot to give the application the necessary permissions - you should change the Manifest XML file, as explained here.