我的 APP 的主要活动充当一个功能选择器,布局上有许多按钮。添加另一个功能后出现此错误,它不应该与主要活动的分离架构的其他旧功能相关。在此之前,下面的两个活动运行良好。我错过了什么?
Main: IPTV_Wallpaper
RSS: RSSDisplayerMain
Map: HealthMapMain
这是 logcat:用于 RSS 阅读器活动的 Logcat
06-23 16:15:00.332: E/AndroidRuntime(3124): FATAL EXCEPTION: main
06-23 16:15:00.332: E/AndroidRuntime(3124): java.lang.IllegalStateException: Could not execute method of the activity
06-23 16:15:00.332: E/AndroidRuntime(3124): at android.view.View$1.onClick(View.java:3597)
06-23 16:15:00.332: E/AndroidRuntime(3124): at android.view.View.performClick(View.java:4202)
06-23 16:15:00.332: E/AndroidRuntime(3124): at android.view.View$PerformClick.run(View.java:17341)
06-23 16:15:00.332: E/AndroidRuntime(3124): at android.os.Handler.handleCallback(Handler.java:725)
06-23 16:15:00.332: E/AndroidRuntime(3124): at android.os.Handler.dispatchMessage(Handler.java:92)
06-23 16:15:00.332: E/AndroidRuntime(3124): at android.os.Looper.loop(Looper.java:137)
06-23 16:15:00.332: E/AndroidRuntime(3124): at android.app.ActivityThread.main(ActivityThread.java:5039)
06-23 16:15:00.332: E/AndroidRuntime(3124): at java.lang.reflect.Method.invokeNative(Native Method)
06-23 16:15:00.332: E/AndroidRuntime(3124): at java.lang.reflect.Method.invoke(Method.java:511)
06-23 16:15:00.332: E/AndroidRuntime(3124): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
06-23 16:15:00.332: E/AndroidRuntime(3124): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
06-23 16:15:00.332: E/AndroidRuntime(3124): at dalvik.system.NativeStart.main(Native Method)
06-23 16:15:00.332: E/AndroidRuntime(3124): Caused by: java.lang.reflect.InvocationTargetException
06-23 16:15:00.332: E/AndroidRuntime(3124): at java.lang.reflect.Method.invokeNative(Native Method)
06-23 16:15:00.332: E/AndroidRuntime(3124): at java.lang.reflect.Method.invoke(Method.java:511)
06-23 16:15:00.332: E/AndroidRuntime(3124): at android.view.View$1.onClick(View.java:3592)
06-23 16:15:00.332: E/AndroidRuntime(3124): ... 11 more
06-23 16:15:00.332: E/AndroidRuntime(3124): Caused by: java.lang.NoClassDefFoundError: tw.danny.idcc_hw2.RSSDisplayerMain
06-23 16:15:00.332: E/AndroidRuntime(3124): at tw.danny.iptv_1.IPTV_Wallpaper.NewsReader(IPTV_Wallpaper.java:116)
06-23 16:15:00.332: E/AndroidRuntime(3124): ... 14 more
用于谷歌地图 API 活动的 Logcat
06-23 16:15:49.582: E/dalvikvm(3143): Could not find class 'com.google.android.gms.maps.model.LatLng', referenced from method tw.danny.healthmap.HealthMapMain.<clinit>
06-23 16:15:49.582: E/dalvikvm(3143): Could not find class 'com.google.android.gms.maps.model.MarkerOptions', referenced from method tw.danny.healthmap.HealthMapMain.MarkOnMap
06-23 16:15:49.592: E/AndroidRuntime(3143): FATAL EXCEPTION: main
06-23 16:15:49.592: E/AndroidRuntime(3143): java.lang.ExceptionInInitializerError
06-23 16:15:49.592: E/AndroidRuntime(3143): at java.lang.Class.newInstanceImpl(Native Method)
06-23 16:15:49.592: E/AndroidRuntime(3143): at java.lang.Class.newInstance(Class.java:1319)
06-23 16:15:49.592: E/AndroidRuntime(3143): at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
06-23 16:15:49.592: E/AndroidRuntime(3143): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
06-23 16:15:49.592: E/AndroidRuntime(3143): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
06-23 16:15:49.592: E/AndroidRuntime(3143): at android.app.ActivityThread.access$600(ActivityThread.java:141)
06-23 16:15:49.592: E/AndroidRuntime(3143): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
06-23 16:15:49.592: E/AndroidRuntime(3143): at android.os.Handler.dispatchMessage(Handler.java:99)
06-23 16:15:49.592: E/AndroidRuntime(3143): at android.os.Looper.loop(Looper.java:137)
06-23 16:15:49.592: E/AndroidRuntime(3143): at android.app.ActivityThread.main(ActivityThread.java:5039)
06-23 16:15:49.592: E/AndroidRuntime(3143): at java.lang.reflect.Method.invokeNative(Native Method)
06-23 16:15:49.592: E/AndroidRuntime(3143): at java.lang.reflect.Method.invoke(Method.java:511)
06-23 16:15:49.592: E/AndroidRuntime(3143): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
06-23 16:15:49.592: E/AndroidRuntime(3143): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
06-23 16:15:49.592: E/AndroidRuntime(3143): at dalvik.system.NativeStart.main(Native Method)
06-23 16:15:49.592: E/AndroidRuntime(3143): Caused by: java.lang.NoClassDefFoundError: com.google.android.gms.maps.model.LatLng
06-23 16:15:49.592: E/AndroidRuntime(3143): at tw.danny.healthmap.HealthMapMain.<clinit>(HealthMapMain.java:36)
06-23 16:15:49.592: E/AndroidRuntime(3143): ... 15 more