Android错误Zygote setruid失败。 errno2

时间:2011-05-02 10:21:40

标签: android

当我尝试执行helloworld应用程序时,我收到了一个Zygote错误。

05-02 15:32:49.067: ERROR/Zygote(32): setreuid() failed. errno: 2 
05-02 15:33:14.048: ERROR/Zygote(32): setreuid() failed. errno: 17 
05-02 15:33:17.798: ERROR/BatteryService(70): usbOnlinePath not found 
05-02 15:33:17.798: ERROR/BatteryService(70): batteryVoltagePath not found 
05-02 15:33:17.798: ERROR/BatteryService(70): batteryTemperaturePath not found 
05-02 15:33:17.890: ERROR/SurfaceFlinger(70): Couldn't open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake 
05-02 15:33:18.278: ERROR/SensorService(70): couldn't open device for module sensors (Invalid argument) 
05-02 15:33:31.228: ERROR/EventHub(70): could not get driver version for /dev/input/mouse0, Not a typewriter 
05-02 15:33:31.228: ERROR/EventHub(70): could not get driver version for /dev/input/mice, Not a typewriter 
05-02 15:33:31.269: ERROR/System(70): Failure starting core service 
05-02 15:33:31.269: ERROR/System(70): java.lang.SecurityException 
05-02 15:33:31.269: ERROR/System(70): at android.os.BinderProxy.transact(Native Method) 
05-02 15:33:31.269: ERROR/System(70): at android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146) 
05-02 15:33:31.269: ERROR/System(70): at android.os.ServiceManager.addService(ServiceManager.java:72) 
05-02 15:33:31.269: ERROR/System(70): at com.android.server.ServerThread.run(SystemServer.java:206) 
05-02 15:33:32.729: ERROR/SoundPool(70): error loading /system/media/audio/ui/Effect_Tick.ogg 
05-02 15:33:32.758: ERROR/SoundPool(70): error loading /system/media/audio/ui/KeypressStandard.ogg 
05-02 15:33:32.768: ERROR/SoundPool(70): error loading /system/media/audio/ui/KeypressSpacebar.ogg 
05-02 15:33:32.819: ERROR/SoundPool(70): error loading /system/media/audio/ui/KeypressDelete.ogg 
05-02 15:33:32.837: ERROR/SoundPool(70): error loading /system/media/audio/ui/KeypressReturn.ogg 
05-02 15:33:33.002: ERROR/UsbObserver(70): java.lang.NullPointerException 
05-02 15:33:33.002: ERROR/UsbObserver(70): at com.android.server.UsbObserver.init(UsbObserver.java:131) 
05-02 15:33:33.002: ERROR/UsbObserver(70): at com.android.server.UsbObserver.(UsbObserver.java:65) 
05-02 15:33:33.002: ERROR/UsbObserver(70): at com.android.server.ServerThread.run(SystemServer.java:402) 
05-02 15:33:35.457: ERROR/ThrottleService(70): Could not open GPS configuration file /etc/gps.conf 
05-02 15:33:40.827: ERROR/logwrapper(135): executing /system/bin/tc failed: No such file or directory 
05-02 15:33:40.907: ERROR/logwrapper(136): executing /system/bin/tc failed: No such file or directory 
05-02 15:33:41.230: ERROR/logwrapper(137): executing /system/bin/tc failed: No such file or directory 
05-02 15:34:27.749: ERROR/ActivityManager(70): Start proc com.android.defcontainer for service com.android.defcontainer/.DefaultContainerService: pid=215 uid=10003 gids={1015, 2001}Load: 4.88 / 1.45 / 0.5 
05-02 15:34:27.749: ERROR/ActivityManager(70): CPU usage from 15ms to 11235ms later:

File1中

public class sayhi extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
   }
}

文件2

<TextView xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/textview" android:layout_width="fill_parent"  
    android:layout_height="fill_parent"  android:text="@string/hello"/>

档案3

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="hello">Hello World, sayhisdadas</string>
    <string name="app_name">HelloWorld</string>
</resources>

1 个答案:

答案 0 :(得分:3)

如果您的应用程序实际运行,那没什么大不了的。

如果您尝试从AVD启动虚拟设备,即使没有您的应用,您也会发现它也会显示Zygote错误。

如果您的应用程序没有运行,那么您的代码中存在问题,但它仍然与Zygote消息无关。

精确度:Zygote告诉您“设置有效用户ID”的setreuid调用失败。 在Linux上,Android是两个记录的错误代码是2和17,这意味着:

EINVAL
    The value of the ruid or euid argument is invalid or out-of-range. 
EPERM
    The current process does not have appropriate privileges, and either an attempt was made to change the effective user ID to a value other than the real user ID or the saved set-user-ID or an attempt was made to change the real user ID to a value not permitted by the implementation.