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 9018623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:34:29+00:00 2026-06-16T04:34:29+00:00

I want to switch from a login activity… I have all the form but

  • 0

I want to switch from a login activity… I have all the form but when i hit the button.. It gets force close.

Here is my code.

First Class

public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    final EditText pass = (EditText)findViewById(R.id.editText1);
    final Intent myIntent = new Intent(getApplicationContext(), Menu.class);

    String mydate = java.text.DateFormat.getDateInstance().format(Calendar.getInstance().getTime());

    TextView fecha = (TextView)findViewById(R.id.textView2);
    fecha.setText(mydate);

    Button next = (Button) findViewById(R.id. button1);
    next.setOnClickListener(new View.OnClickListener() {
        public void onClick(View v) {


            if("12345".equals(pass.getText().toString())) {
            //Toast.makeText(getApplicationContext(), "Clave Correcta", Toast.LENGTH_SHORT).show();

            startActivity(myIntent);
            }
            else {

                Toast.makeText(getApplicationContext(), "Clave Incorrecta", Toast.LENGTH_SHORT).show();

            }
        }

    });

}

Second class.

public class Menu extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.menu);

}

}

Log Cat:

12-21 17:04:53.710: E/Trace(2389): error opening trace file: No such file or directory (2)
12-21 17:04:57.680: E/AndroidRuntime(2389): FATAL EXCEPTION: main
12-21 17:04:57.680: E/AndroidRuntime(2389): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.pizzasjaps/android.view.Menu}; have you declared this activity in your AndroidManifest.xml?
12-21 17:04:57.680: E/AndroidRuntime(2389):     at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1541)
12-21 17:04:57.680: E/AndroidRuntime(2389):     at android.app.Instrumentation.execStartActivity(Instrumentation.java:1416)
12-21 17:04:57.680: E/AndroidRuntime(2389):     at android.app.Activity.startActivityForResult(Activity.java:3351)
12-21 17:04:57.680: E/AndroidRuntime(2389):     at android.app.Activity.startActivityForResult(Activity.java:3312)
12-21 17:04:57.680: E/AndroidRuntime(2389):     at android.app.Activity.startActivity(Activity.java:3522)
12-21 17:04:57.680: E/AndroidRuntime(2389):     at android.app.Activity.startActivity(Activity.java:3490)
12-21 17:04:57.680: E/AndroidRuntime(2389):     at com.example.pizzasjaps.MainActivity$1.onClick(MainActivity.java:39)
12-21 17:04:57.680: E/AndroidRuntime(2389):     at android.view.View.performClick(View.java:4084)
12-21 17:04:57.680: E/AndroidRuntime(2389):     at android.view.View$PerformClick.run(View.java:16966)
12-21 17:04:57.680: E/AndroidRuntime(2389):     at android.os.Handler.handleCallback(Handler.java:615)
12-21 17:04:57.680: E/AndroidRuntime(2389):     at android.os.Handler.dispatchMessage(Handler.java:92)
12-21 17:04:57.680: E/AndroidRuntime(2389):     at android.os.Looper.loop(Looper.java:137)
12-21 17:04:57.680: E/AndroidRuntime(2389):     at android.app.ActivityThread.main(ActivityThread.java:4906)
12-21 17:04:57.680: E/AndroidRuntime(2389):     at java.lang.reflect.Method.invokeNative(Native Method)
12-21 17:04:57.680: E/AndroidRuntime(2389):     at java.lang.reflect.Method.invoke(Method.java:511)
12-21 17:04:57.680: E/AndroidRuntime(2389):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
12-21 17:04:57.680: E/AndroidRuntime(2389):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558)
12-21 17:04:57.680: E/AndroidRuntime(2389):     at dalvik.system.NativeStart.main(Native Method)
  • 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-06-16T04:34:30+00:00Added an answer on June 16, 2026 at 4:34 am

    From your LogCat:

    Unable to find explicit activity class {com.example.pizzasjaps/android.view.Menu}
    

    This line is trying to load the class android.view.Menu instead of your Menu Activity:

    final Intent myIntent = new Intent(getApplicationContext(), Menu.class);
    

    Scope Menu to the appropriate class (and consider using this instead of getApplicationContext()):

    final Intent myIntent = new Intent(this, com.example.pizzasjaps.Menu.class);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to switch a file upload from FTP to SFTP. But I cannot
I want to Switch from Web Designer to Front End Developer or web developer
I want to be able to switch from the current db to multiple dbs
I want to switch over to Mono from .Net (plus Visual Studio to whatever
I'm on OSX and want to switch back to my original zsh config from
I have a web page where I want to switch the background image of
I want to switch from my app to a web site (http://translate.google.com/) just clicking
From other threads here I have gotten a modal view login screen to show
I want that when I press login button I get the response back in
I have used Twitter framework for login and tweet from iphone app .Now i

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.