我正在尝试制作我的第一个应用程序,并且制作了 2 个页面(LogoActivity(主页面)和 screen_2)。除了 LogCat,我没有任何问题。我不知道那是什么。如果你能告诉我一些事情,我很高兴学习:)。这是我从 Eclipse 获得的日志文件。
05-15 21:04:04.981: D/AndroidRuntime(382): Shutting down VM
05-15 21:04:04.981: W/dalvikvm(382): threadid=1: thread exiting with uncaught exception (group=0x40015560)
05-15 21:04:05.001: E/AndroidRuntime(382): FATAL EXCEPTION: main
05-15 21:04:05.001: E/AndroidRuntime(382): java.lang.RuntimeException: Unable to start activity ComponentInfo{eu.eyestudios.logo/eu.eyestudios.logo.LogoActivity}: java.lang.ClassCastException: android.widget.ImageButton
05-15 21:04:05.001: E/AndroidRuntime(382): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
05-15 21:04:05.001: E/AndroidRuntime(382): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
05-15 21:04:05.001: E/AndroidRuntime(382): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
05-15 21:04:05.001: E/AndroidRuntime(382): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
05-15 21:04:05.001: E/AndroidRuntime(382): at android.os.Handler.dispatchMessage(Handler.java:99)
05-15 21:04:05.001: E/AndroidRuntime(382): at android.os.Looper.loop(Looper.java:123)
05-15 21:04:05.001: E/AndroidRuntime(382): at android.app.ActivityThread.main(ActivityThread.java:3683)
05-15 21:04:05.001: E/AndroidRuntime(382): at java.lang.reflect.Method.invokeNative(Native Method)
05-15 21:04:05.001: E/AndroidRuntime(382): at java.lang.reflect.Method.invoke(Method.java:507)
05-15 21:04:05.001: E/AndroidRuntime(382): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
05-15 21:04:05.001: E/AndroidRuntime(382): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
05-15 21:04:05.001: E/AndroidRuntime(382): at dalvik.system.NativeStart.main(Native Method)
05-15 21:04:05.001: E/AndroidRuntime(382): Caused by: java.lang.ClassCastException: android.widget.ImageButton
05-15 21:04:05.001: E/AndroidRuntime(382): at eu.eyestudios.logo.LogoActivity.onCreate(LogoActivity.java:14)
05-15 21:04:05.001: E/AndroidRuntime(382): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
05-15 21:04:05.001: E/AndroidRuntime(382): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
05-15 21:04:05.001: E/AndroidRuntime(382): ... 11 more
非常感谢!:)