Hi, I am writing a rating player which has a button of one activity
served as a jump to another activity. Basically I am implementing an
OnClickListener of this button, and hoping that if one clicked the
button, it should jump to another activity. The partial code of the
original activity is as followes:

public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        startButton = (Button) findViewById(R.id.start_button);
        startButton.setOnClickListener(mVideoListener);
    }

    private OnClickListener mVideoListener = new OnClickListener(){

                @Override
                public void onClick(View v) {
                        // TODO Auto-generated method stub
                        WriteFile();
                        Intent intent = new 
Intent(RatingPlayer.this.getApplication(),
Inplayer.class);
                        startActivity(intent);
                }

    };

and corresponding layout file is as follows:

<Button
        android:id="@+id/start_button"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/button_start" />

And the OnCreate method of jumping activity is as follows:

public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.inplay);
        mvideo = (VideoView)findViewById(R.id.video);
        mvideo.setOnCompletionListener(mOnCompletionListener);
        PlayVideo();
        }

When I debug this program, setting a breakpoint at
"super.onCreate(savedInstanceState);" in the jumping activity, they
will invoke a "java.lang.reflect.InvocationTargetException" and then
ActivityNotFoundException, and finally an error message poped out.

I am hoping there's someone who can input some help or give some
advice on how to find the problematic code. Thank you so much.

Aki

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to