我正在尝试使“锻炼列表”页面上的“耐力”按钮启动“耐力”列表。 “热身”按钮可以正常工作。但是,耐用性按钮会使应用程序在单击时崩溃。这是练习列表Java:

    package com.example.chopbuilderfordrums;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class ExerciseList extends Activity implements View.OnClickListener {

    Button button1;
    Button button2;

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_exercise_list);
        button1 = (Button)findViewById(R.id.button1);
        button1.setOnClickListener(this);
        button2 = (Button)findViewById(R.id.button2);
        button2.setOnClickListener(this);
    }

    private void button1Click()
    {
        startActivity(new Intent("com.example.chopbuilderfordrums.LaunchWarmupsList"     ));
    }

    private void button2Click()
    {
        startActivity(new     Intent("com.example.chopbuilderfordrums.LaunchEnduranceList" ));
    }
    public void onClick (View v) {
        switch (v.getId())
        {
        case R.id.button1:
            button1Click();
            break;
        case R.id.button2:
                button2Click();
                break;
        }

    }




}


这是按下按钮时出现的错误:

03-23 16:18:36.056: D/dalvikvm(1541): Not late-enabling CheckJNI (already on)
03-23 16:18:41.536: D/gralloc_goldfish(1541): Emulator without GPU emulation detected.
03-23 16:18:47.766: I/Choreographer(1541): Skipped 61 frames!  The application may be doing too much work on its main thread.
03-23 16:26:41.666: I/Choreographer(1541): Skipped 87 frames!  The application may be doing too much work on its main thread.
03-23 16:26:52.336: I/Choreographer(1541): Skipped 119 frames!  The application may be doing too much work on its main thread.
03-23 16:26:52.636: D/dalvikvm(1541): GC_FOR_ALLOC freed 119K, 6% free 3263K/3452K, paused 272ms, total 286ms
03-23 16:37:32.486: D/gralloc_goldfish(1613): Emulator without GPU emulation detected.
03-23 17:05:05.426: D/gralloc_goldfish(1670): Emulator without GPU emulation detected.
03-23 17:05:08.246: D/dalvikvm(1670): GC_FOR_ALLOC freed 75K, 5% free 3235K/3380K, paused 75ms, total 80ms
03-23 17:05:08.356: D/dalvikvm(1670): GC_FOR_ALLOC freed 7K, 5% free 3326K/3480K, paused 67ms, total 68ms
03-23 17:05:08.376: I/dalvikvm-heap(1670): Grow heap (frag case) to 4.389MB for 1127536-byte allocation
03-23 17:05:08.436: D/dalvikvm(1670): GC_FOR_ALLOC freed <1K, 4% free 4427K/4584K, paused 51ms, total 51ms
03-23 17:33:21.006: D/gralloc_goldfish(1721): Emulator without GPU emulation detected.
03-23 17:33:24.376: D/dalvikvm(1721): GC_FOR_ALLOC freed 79K, 5% free 3234K/3384K, paused 78ms, total 87ms
03-23 17:33:24.436: D/dalvikvm(1721): GC_FOR_ALLOC freed 7K, 5% free 3326K/3484K, paused 48ms, total 49ms
03-23 17:33:24.466: I/dalvikvm-heap(1721): Grow heap (frag case) to 4.389MB for 1127536-byte allocation
03-23 17:33:24.526: D/dalvikvm(1721): GC_FOR_ALLOC freed <1K, 4% free 4426K/4588K, paused 54ms, total 54ms
03-23 17:33:36.946: I/Choreographer(1721): Skipped 37 frames!  The application may be doing too much work on its main thread.
03-23 17:34:23.676: I/Choreographer(1721): Skipped 41 frames!  The application may be doing too much work on its main thread.
03-23 17:34:25.736: I/Choreographer(1721): Skipped 50 frames!  The application may be doing too much work on its main thread.
03-23 17:36:25.806: D/gralloc_goldfish(1786): Emulator without GPU emulation detected.
03-23 17:36:28.826: D/dalvikvm(1786): GC_FOR_ALLOC freed 83K, 5% free 3234K/3388K, paused 81ms, total 89ms
03-23 17:36:28.916: D/dalvikvm(1786): GC_FOR_ALLOC freed 1K, 5% free 3331K/3488K, paused 63ms, total 64ms
03-23 17:36:28.926: I/dalvikvm-heap(1786): Grow heap (frag case) to 4.395MB for 1127536-byte allocation
03-23 17:36:28.986: D/dalvikvm(1786): GC_FOR_ALLOC freed 5K, 4% free 4427K/4592K, paused 45ms, total 45ms
03-23 17:36:42.046: I/Choreographer(1786): Skipped 75 frames!  The application may be doing too much work on its main thread.
03-23 17:54:38.296: I/Choreographer(1786): Skipped 228 frames!  The application may be doing too much work on its main thread.
03-23 18:10:19.436: D/gralloc_goldfish(1841): Emulator without GPU emulation detected.
03-23 18:10:21.866: D/AndroidRuntime(1841): Shutting down VM
03-23 18:10:21.866: W/dalvikvm(1841): threadid=1: thread exiting with uncaught exception (group=0xb1a43b90)
03-23 18:10:21.936: E/AndroidRuntime(1841): FATAL EXCEPTION: main
03-23 18:10:21.936: E/AndroidRuntime(1841): Process: com.example.chopbuilderfordrums, PID: 1841
03-23 18:10:21.936: E/AndroidRuntime(1841): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.example.chopbuilderfordrums.LaunchEnduranceList }
03-23 18:10:21.936: E/AndroidRuntime(1841):     at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1632)
03-23 18:10:21.936: E/AndroidRuntime(1841):     at android.app.Instrumentation.execStartActivity(Instrumentation.java:1424)
03-23 18:10:21.936: E/AndroidRuntime(1841):     at android.app.Activity.startActivityForResult(Activity.java:3423)
03-23 18:10:21.936: E/AndroidRuntime(1841):     at android.app.Activity.startActivityForResult(Activity.java:3384)
03-23 18:10:21.936: E/AndroidRuntime(1841):     at android.app.Activity.startActivity(Activity.java:3626)
03-23 18:10:21.936: E/AndroidRuntime(1841):     at android.app.Activity.startActivity(Activity.java:3594)
03-23 18:10:21.936: E/AndroidRuntime(1841):     at com.example.chopbuilderfordrums.ExerciseList.button2Click(ExerciseList.java:32)
03-23 18:10:21.936: E/AndroidRuntime(1841):     at com.example.chopbuilderfordrums.ExerciseList.onClick(ExerciseList.java:42)
03-23 18:10:21.936: E/AndroidRuntime(1841):     at android.view.View.performClick(View.java:4424)
03-23 18:10:21.936: E/AndroidRuntime(1841):     at android.view.View$PerformClick.run(View.java:18383)
03-23 18:10:21.936: E/AndroidRuntime(1841):     at android.os.Handler.handleCallback(Handler.java:733)
03-23 18:10:21.936: E/AndroidRuntime(1841):     at android.os.Handler.dispatchMessage(Handler.java:95)
03-23 18:10:21.936: E/AndroidRuntime(1841):     at android.os.Looper.loop(Looper.java:137)
03-23 18:10:21.936: E/AndroidRuntime(1841):     at android.app.ActivityThread.main(ActivityThread.java:4998)
03-23 18:10:21.936: E/AndroidRuntime(1841):     at java.lang.reflect.Method.invokeNative(Native Method)
03-23 18:10:21.936: E/AndroidRuntime(1841):     at java.lang.reflect.Method.invoke(Method.java:515)
03-23 18:10:21.936: E/AndroidRuntime(1841):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
03-23 18:10:21.936: E/AndroidRuntime(1841):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
03-23 18:10:21.936: E/AndroidRuntime(1841):     at dalvik.system.NativeStart.main(Native Method)
03-23 18:10:29.176: I/Process(1841): Sending signal. PID: 1841 SIG: 9
03-23 18:10:46.296: D/gralloc_goldfish(1874): Emulator without GPU emulation detected.
03-23 18:10:48.526: D/AndroidRuntime(1874): Shutting down VM
03-23 18:10:48.526: W/dalvikvm(1874): threadid=1: thread exiting with uncaught exception (group=0xb1a43b90)
03-23 18:10:48.606: E/AndroidRuntime(1874): FATAL EXCEPTION: main
03-23 18:10:48.606: E/AndroidRuntime(1874): Process: com.example.chopbuilderfordrums, PID: 1874
03-23 18:10:48.606: E/AndroidRuntime(1874): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.example.chopbuilderfordrums.LaunchEnduranceList }
03-23 18:10:48.606: E/AndroidRuntime(1874):     at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1632)
03-23 18:10:48.606: E/AndroidRuntime(1874):     at android.app.Instrumentation.execStartActivity(Instrumentation.java:1424)
03-23 18:10:48.606: E/AndroidRuntime(1874):     at android.app.Activity.startActivityForResult(Activity.java:3423)
03-23 18:10:48.606: E/AndroidRuntime(1874):     at android.app.Activity.startActivityForResult(Activity.java:3384)
03-23 18:10:48.606: E/AndroidRuntime(1874):     at android.app.Activity.startActivity(Activity.java:3626)
03-23 18:10:48.606: E/AndroidRuntime(1874):     at android.app.Activity.startActivity(Activity.java:3594)
03-23 18:10:48.606: E/AndroidRuntime(1874):     at com.example.chopbuilderfordrums.ExerciseList.button2Click(ExerciseList.java:32)
03-23 18:10:48.606: E/AndroidRuntime(1874):     at com.example.chopbuilderfordrums.ExerciseList.onClick(ExerciseList.java:42)
03-23 18:10:48.606: E/AndroidRuntime(1874):     at android.view.View.performClick(View.java:4424)
03-23 18:10:48.606: E/AndroidRuntime(1874):     at android.view.View$PerformClick.run(View.java:18383)
03-23 18:10:48.606: E/AndroidRuntime(1874):     at android.os.Handler.handleCallback(Handler.java:733)
03-23 18:10:48.606: E/AndroidRuntime(1874):     at android.os.Handler.dispatchMessage(Handler.java:95)
03-23 18:10:48.606: E/AndroidRuntime(1874):     at android.os.Looper.loop(Looper.java:137)
03-23 18:10:48.606: E/AndroidRuntime(1874):     at android.app.ActivityThread.main(ActivityThread.java:4998)
03-23 18:10:48.606: E/AndroidRuntime(1874):     at java.lang.reflect.Method.invokeNative(Native Method)
03-23 18:10:48.606: E/AndroidRuntime(1874):     at java.lang.reflect.Method.invoke(Method.java:515)
03-23 18:10:48.606: E/AndroidRuntime(1874):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
03-23 18:10:48.606: E/AndroidRuntime(1874):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
03-23 18:10:48.606: E/AndroidRuntime(1874):     at dalvik.system.NativeStart.main(Native Method)
03-23 18:10:52.076: I/Process(1874): Sending signal. PID: 1874 SIG: 9
03-23 18:16:35.376: D/gralloc_goldfish(1927): Emulator without GPU emulation detected.
03-23 18:16:41.526: D/AndroidRuntime(1927): Shutting down VM
03-23 18:16:41.526: W/dalvikvm(1927): threadid=1: thread exiting with uncaught exception (group=0xb1a43b90)
03-23 18:16:41.596: E/AndroidRuntime(1927): FATAL EXCEPTION: main
03-23 18:16:41.596: E/AndroidRuntime(1927): Process: com.example.chopbuilderfordrums, PID: 1927
03-23 18:16:41.596: E/AndroidRuntime(1927): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.example.chopbuilderfordrums.LaunchEnduranceList }
03-23 18:16:41.596: E/AndroidRuntime(1927):     at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1632)
03-23 18:16:41.596: E/AndroidRuntime(1927):     at android.app.Instrumentation.execStartActivity(Instrumentation.java:1424)
03-23 18:16:41.596: E/AndroidRuntime(1927):     at android.app.Activity.startActivityForResult(Activity.java:3423)
03-23 18:16:41.596: E/AndroidRuntime(1927):     at android.app.Activity.startActivityForResult(Activity.java:3384)
03-23 18:16:41.596: E/AndroidRuntime(1927):     at android.app.Activity.startActivity(Activity.java:3626)
03-23 18:16:41.596: E/AndroidRuntime(1927):     at android.app.Activity.startActivity(Activity.java:3594)
03-23 18:16:41.596: E/AndroidRuntime(1927):     at com.example.chopbuilderfordrums.ExerciseList.button2Click(ExerciseList.java:32)
03-23 18:16:41.596: E/AndroidRuntime(1927):     at com.example.chopbuilderfordrums.ExerciseList.onClick(ExerciseList.java:41)
03-23 18:16:41.596: E/AndroidRuntime(1927):     at android.view.View.performClick(View.java:4424)
03-23 18:16:41.596: E/AndroidRuntime(1927):     at android.view.View$PerformClick.run(View.java:18383)
03-23 18:16:41.596: E/AndroidRuntime(1927):     at android.os.Handler.handleCallback(Handler.java:733)
03-23 18:16:41.596: E/AndroidRuntime(1927):     at android.os.Handler.dispatchMessage(Handler.java:95)
03-23 18:16:41.596: E/AndroidRuntime(1927):     at android.os.Looper.loop(Looper.java:137)
03-23 18:16:41.596: E/AndroidRuntime(1927):     at android.app.ActivityThread.main(ActivityThread.java:4998)
03-23 18:16:41.596: E/AndroidRuntime(1927):     at java.lang.reflect.Method.invokeNative(Native Method)
03-23 18:16:41.596: E/AndroidRuntime(1927):     at java.lang.reflect.Method.invoke(Method.java:515)
03-23 18:16:41.596: E/AndroidRuntime(1927):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
03-23 18:16:41.596: E/AndroidRuntime(1927):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
03-23 18:16:41.596: E/AndroidRuntime(1927):     at dalvik.system.NativeStart.main(Native Method)
03-23 18:17:48.786: D/gralloc_goldfish(1950): Emulator without GPU emulation detected.
03-23 18:17:51.566: D/dalvikvm(1950): GC_FOR_ALLOC freed 57K, 4% free 3235K/3364K, paused 83ms, total 93ms
03-23 18:17:51.676: D/dalvikvm(1950): GC_FOR_ALLOC freed 7K, 4% free 3326K/3464K, paused 73ms, total 84ms
03-23 18:17:51.686: I/dalvikvm-heap(1950): Grow heap (frag case) to 4.389MB for 1127536-byte allocation
03-23 18:17:51.776: D/dalvikvm(1950): GC_FOR_ALLOC freed <1K, 4% free 4427K/4568K, paused 84ms, total 85ms


请帮助我解决这些问题。我是全新的!

最佳答案

AndroidRuntime(1874): Shutting down VM 03-23 18:10:48.526:
 W/dalvikvm(1874): threadid=1: thread exiting with
uncaught exception (group=0xb1a43b90)
03-23 18:10:48.606: E/AndroidRuntime(1874): FATAL EXCEPTION:
 main 03-23 18:10:48.606: E/AndroidRuntime(1874): Process:
com.example.chopbuilderfordrums,
PID: 1874 03-23 18:10:48.606: E/AndroidRuntime(1874):


根据这个:

android.content.ActivityNotFoundException:
     No Activity found to handle Intent
    { act=com.example.chopbuilderfordrums.LaunchEnduranceList }


com.example.chopbuilderfordrums.LaunchEnduranceList活动为:


未在AndroidManifest.xml中声明
您尚未创建LaunchEnduranceList类:
 public class LaunchEnduranceList extends Activity

10-04 19:17