English 中文(简体)
安乐施会问题[闭]
原标题:Android emulator problem [closed]

电话 我在一顿点上点击了,这里没有任何法律(我使用Log.d()并发现,处决在定立的ContentView(R.layout.play)之前已经停止。

   public void onClick(View v) {
        switch( v.getId()){
        case R.id.play:
            setContentView(R.layout.play);
            setQuestion();
        case R.id.level:
            setContentView(R.layout.level);
            if(lvl=="1") {
                lvl1.setChecked(true);
            }
            if(lvl=="2") {
                lvl2.setChecked(true);
            }
            if(lvl=="3") {
                lvl3.setChecked(true);
            }
            if(lvl=="4") {
                lvl4.setChecked(true);
            }
            if(lvl=="5") {
                lvl5.setChecked(true);
            }
            setContentView(R.layout.level);

        case R.id.setLevel:
            if(lvl1.isChecked()) {
                setLevel("1");
            }
            if(lvl2.isChecked()) {
                setLevel("2");
            }
            if(lvl3.isChecked()) {
                setLevel("3");
            }
            if(lvl4.isChecked()) {
                setLevel("4");
            }
            if(lvl5.isChecked()) {
                setLevel("5");
            }







        }
    }

当点击 but子时,它就没有!

标识:

03-19 00:11:57.708: ERROR/Zygote(32): setreuid() failed. errno: 2
03-19 00:12:11.897: ERROR/Zygote(32): setreuid() failed. errno: 17
03-19 00:12:15.643: ERROR/BatteryService(67): usbOnlinePath not found
03-19 00:12:15.643: ERROR/BatteryService(67): batteryVoltagePath not found
03-19 00:12:15.658: ERROR/BatteryService(67): batteryTemperaturePath not found
03-19 00:12:15.751: ERROR/SurfaceFlinger(67): Couldn t open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake
03-19 00:12:26.218: ERROR/EventHub(67): could not get driver version for /dev/input/mouse0, Not a typewriter
03-19 00:12:26.238: ERROR/EventHub(67): could not get driver version for /dev/input/mice, Not a typewriter
03-19 00:12:26.747: ERROR/System(67): Failure starting core service
03-19 00:12:26.747: ERROR/System(67): java.lang.SecurityException
03-19 00:12:26.747: ERROR/System(67):     at android.os.BinderProxy.transact(Native Method)
03-19 00:12:26.747: ERROR/System(67):     at android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146)
03-19 00:12:26.747: ERROR/System(67):     at android.os.ServiceManager.addService(ServiceManager.java:72)
03-19 00:12:26.747: ERROR/System(67):     at com.android.server.ServerThread.run(SystemServer.java:184)
03-19 00:12:28.257: ERROR/VoldConnector(67): No connection to daemon
03-19 00:12:28.257: ERROR/VoldConnector(67): java.lang.IllegalStateException
03-19 00:12:28.257: ERROR/VoldConnector(67):     at com.android.server.NativeDaemonConnector.sendCommand(NativeDaemonConnector.java:191)
03-19 00:12:28.257: ERROR/VoldConnector(67):     at com.android.server.NativeDaemonConnector.sendCommand(NativeDaemonConnector.java:178)
03-19 00:12:28.257: ERROR/VoldConnector(67):     at com.android.server.NativeDaemonConnector.doCommand(NativeDaemonConnector.java:213)
03-19 00:12:28.257: ERROR/VoldConnector(67):     at com.android.server.NativeDaemonConnector.doListCommand(NativeDaemonConnector.java:258)
03-19 00:12:28.257: ERROR/VoldConnector(67):     at com.android.server.MountService$2.run(MountService.java:425)
03-19 00:12:29.322: ERROR/SoundPool(67): error loading /system/media/audio/ui/Effect_Tick.ogg
03-19 00:12:29.338: ERROR/SoundPool(67): error loading /system/media/audio/ui/KeypressStandard.ogg
03-19 00:12:29.347: ERROR/SoundPool(67): error loading /system/media/audio/ui/KeypressSpacebar.ogg
03-19 00:12:29.411: ERROR/SoundPool(67): error loading /system/media/audio/ui/KeypressDelete.ogg
03-19 00:12:29.427: ERROR/SoundPool(67): error loading /system/media/audio/ui/KeypressReturn.ogg
03-19 00:13:31.174: ERROR/Zygote(32): setreuid() failed. errno: 2
03-19 00:13:43.834: ERROR/Zygote(32): setreuid() failed. errno: 17
03-19 00:13:46.234: ERROR/BatteryService(67): usbOnlinePath not found
03-19 00:13:46.234: ERROR/BatteryService(67): batteryVoltagePath not found
03-19 00:13:46.234: ERROR/BatteryService(67): batteryTemperaturePath not found
03-19 00:13:46.284: ERROR/SurfaceFlinger(67): Couldn t open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake
03-19 00:13:57.094: ERROR/EventHub(67): could not get driver version for /dev/input/mouse0, Not a typewriter
03-19 00:13:57.104: ERROR/EventHub(67): could not get driver version for /dev/input/mice, Not a typewriter
03-19 00:13:57.475: ERROR/System(67): Failure starting core service
03-19 00:13:57.475: ERROR/System(67): java.lang.SecurityException
03-19 00:13:57.475: ERROR/System(67):     at android.os.BinderProxy.transact(Native Method)
03-19 00:13:57.475: ERROR/System(67):     at android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146)
03-19 00:13:57.475: ERROR/System(67):     at android.os.ServiceManager.addService(ServiceManager.java:72)
03-19 00:13:57.475: ERROR/System(67):     at com.android.server.ServerThread.run(SystemServer.java:184)
03-19 00:13:59.354: ERROR/SoundPool(67): error loading /system/media/audio/ui/Effect_Tick.ogg
03-19 00:13:59.374: ERROR/SoundPool(67): error loading /system/media/audio/ui/KeypressStandard.ogg
03-19 00:13:59.404: ERROR/SoundPool(67): error loading /system/media/audio/ui/KeypressSpacebar.ogg
03-19 00:13:59.413: ERROR/SoundPool(67): error loading /system/media/audio/ui/KeypressDelete.ogg
03-19 00:13:59.413: ERROR/SoundPool(67): error loading /system/media/audio/ui/KeypressReturn.ogg
03-19 00:14:04.984: ERROR/ThrottleService(67): Could not open GPS configuration file /etc/gps.conf
03-19 00:14:07.064: ERROR/logwrapper(147): executing /system/bin/tc failed: No such file or directory
03-19 00:14:07.135: ERROR/logwrapper(149): executing /system/bin/tc failed: No such file or directory
03-19 00:14:07.204: ERROR/logwrapper(150): executing /system/bin/tc failed: No such file or directory
问题回答

Since Strings are objects, you should not compare Strings with ==. Instead, you should use lvl.equals("2").

此外,每一案件均以<代码>突破;声明。 否则,将执行下文所述守则。

我注意到几个问题。

(1) 您没有<代码>突破;在每个<代码>末的报表:。 页: 1

2) You calls setContentView(R.layout.level); at thestart of the R.id.level case and Just before the R.id.setlevel case. 我所看到的是一个呼吁。 是否有两条电话的理由? 我认为,第二次呼吁可能重新开始任何改动。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签