Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7675485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:58:27+00:00 2026-05-31T16:58:27+00:00

I am facing an issue with a button onclick. I checked with previously asked

  • 0

I am facing an issue with a button onclick. I checked with previously asked questions, but was not able to figure out the problem, where exactly it lies. The first time, when I click on, ‘Next’ button, it successfully moves to next page, but in the second page, after entering details, when the ‘Proceed’button is clicked, the application crashes.

Activity1:

package com.application.P1;

//import com.application.P1.R;
//import android.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;


public class P1Activity extends Activity implements View.OnClickListener{
        /** Called when the activity is first created. */



    //  @Override
        public void onCreate(Bundle savedInstanceState) {


            super.onCreate(savedInstanceState);

            //Using TextView to Give a Home Page Screen
            TextView tv=new TextView(this);
            tv.setText("WELCOME TO Application Click on Next to Proceed");



             setContentView(R.layout.main);
        }





        public void Welcome( View v){

           // Toast.makeText(this, "Please enter your Nickname and proceed further", Toast.LENGTH_SHORT).show();        


            Intent myActivity = new Intent(this,Activity2.class);
            startActivity(myActivity);

          //  EditText t



        }
        @Override
        public void onClick(View v) {
            // TODO Auto-generated method stub


        }



    }

Activity2:

package com.application.P1;


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

public class Activity2 extends Activity implements View.OnClickListener{
        /** Called when the activity is first created. */
      //  @Override
        public void onCreate(Bundle savedInstanceState) {


            super.onCreate(savedInstanceState);



             setContentView(R.layout.login);
        }



        public void Proceed4( View v){

    //      Toast.makeText(this, "Thanks for entering your nickname", Toast.LENGTH_SHORT).show();

           Intent myActivity2 = new Intent(this,Activity3.class);
            startActivity(myActivity2);



          //  EditText t



        }

        @Override
        public void onClick(View v) {
            // TODO Auto-generated method stub

        }



    }

Activity3:

package com.application.P1;

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


public class Activity3 extends Activity implements View.OnClickListener{
        /** Called when the activity is first created. */


    //  @Override
        public void onCreate(Bundle savedInstanceState) {

            super.onCreate(savedInstanceState);



             setContentView(R.layout.check);
        }

        @Override
        public void onClick(View v) {
            // TODO Auto-generated method stub


        }







    }

All the three activities are in same package. In the second activity, after button click, when a message is toasted, the toasted message is coming properly. But, when the next activity is called, it is not coming.

XML Coding:

Main.xml:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" 
    android:background="@drawable/backrepeat"
    >


    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/hello" />

    <Button
      android:text="@string/Next"
      android:id="@+id/Button01" 
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"        
      android:onClick="Welcome"/>





</LinearLayout>

login.xml:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" 
    >



     <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/mynickname" />



 <EditText
            android:id="@+id/mynickname3"
            android:singleLine="true"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
    />

    <Button
      android:text="@string/Proceed"
      android:id="@+id/Button02" 
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"        
      android:onClick="Proceed4"/>


</LinearLayout>

Check.xml:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/hello3" />
 </LinearLayout>

AndroidManifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.application.P1"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="10" />

    <application
        android:icon="@drawable/cherry"
        android:label="@string/app_name" >
        <activity
            android:name=".P1Activity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity android:name=".Activity2">


        </activity>

        <activity android:name=".Activity3"></activity>

        </application>

</manifest>

03-22 00:50:27.125: E/AndroidRuntime(857): at java.lang.reflect.Method.invokeNative(Native Method)
03-22 00:50:27.125: E/AndroidRuntime(857): at java.lang.reflect.Method.invoke(Method.java:507)
03-22 00:50:27.125: E/AndroidRuntime(857): at android.view.View$1.onClick(View.java:2139)
03-22 00:50:27.125: E/AndroidRuntime(857): … 11 more
03-22 00:50:27.125: E/AndroidRuntime(857): Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity

class {com.application.P1/com.application.P1.Activity3}; have you declared this activity in your AndroidManifest.xml?
03-22 00:50:27.125: E/AndroidRuntime(857):  at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1405)
03-22 00:50:27.125: E/AndroidRuntime(857):  at android.app.Instrumentation.execStartActivity(Instrumentation.java:1379)
03-22 00:50:27.125: E/AndroidRuntime(857):  at android.app.Activity.startActivityForResult(Activity.java:2827)
03-22 00:50:27.125: E/AndroidRuntime(857):  at android.app.Activity.startActivity(Activity.java:2933)
03-22 00:50:27.125: E/AndroidRuntime(857):  at com.application.P1.Activity2.Proceed4(Activity2.java:31)
03-22 00:50:27.125: E/AndroidRuntime(857):  ... 14 more
03-22 00:50:29.867: I/Process(857): Sending signal. PID: 857 SIG: 9

Values.xml:

<string name="hello">Welcome to Expresso Application</string>
      <string name="Next">Next</string>
      <string name="app_name">Expresso2</string>
      <string name="Proceed">Proceed</string>
      <string name="Nickname">Nickname</string>
      <string name="mynickname">myNickname</string>

       <string name="hello3">Tensions</string>

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T16:58:29+00:00Added an answer on May 31, 2026 at 4:58 pm

    Based on the stack trace, it appears that your manifest file does not declare the activity. Check that there is an <activity> tag for Activity3.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using ASP.NET MVC2 with NHibernate, but am facing an issue. All calls
I am using cs3pie and facing some issue with it. It's working but instead
I am facing an issue with FB Like button. I used below code to
I am facing a weird issue and not sure whether it's jquery or combination
I am facing an issue Empty id attribute is not allowed in JSF while
Its very strange behavior that I'm facing. I have delete button, OnClick I'm attaching
I am facing exactly the problem mentioned in these links: http://code.google.com/p/android/issues/detail?id=2373 http://groups.google.com/group/android-developers/browse_thread/thread/77aedf6c7daea2ae/da073056831fd8f3?#da073056831fd8f3 http://groups.google.com/group/android-developers/browse_thread/thread/2d88391190be3303?tvc=2 I
I am facing strange issue on Windows CE: Running 3 EXEs 1)First exe doing
I am new to MVC and facing one issue. I have a xml file
I am using Appweb server (mini http server) and facing an issue while opening

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.