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

  • Home
  • SEARCH
  • 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 8007259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T17:46:07+00:00 2026-06-04T17:46:07+00:00

I am making an android app using android 2.2 and eclipse. Its a simple

  • 0

I am making an android app using android 2.2 and eclipse.
Its a simple app which should change activities from “CoverPageApp.java” to “LoginActivity.java”
and then to another activity.
But as I click the “Start Button” in CoverPageApp.java, the app force closes.

LoginActivity.java

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


public class LoginActivity extends Activity {

    Button btnLinkToRegistrScrn;
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
     setContentView(R.layout.login);
     addListenerOnButton();
     btnLinkToRegistrScrn = (Button) findViewById(R.id.LinkToRegisterScreen); 

   }


    public void addListenerOnButton() {

        final Context context2 = this;

        Button loginbtn1 = (Button) findViewById(R.id.btnLogin);

            loginbtn1.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View arg0) {

                Intent intent = new Intent(context2, DashboardActivity.class);
                         context2.startActivity(intent);   
            }

        });
    }


    { 
        // Link to Register Screen 
        btnLinkToRegistrScrn.setOnClickListener(new View.OnClickListener() { 
           @Override
            public void onClick(View view) { 
                Intent i = new Intent(getApplicationContext(), CAActivity.class); 
                startActivity(i); 
                } 
       }); 

    }   

   }

LogCat

05-31 12:37:08.620: D/AndroidRuntime(629): Shutting down VM
05-31 12:37:08.620: W/dalvikvm(629): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
05-31 12:37:08.630: E/AndroidRuntime(629): FATAL EXCEPTION: main
05-31 12:37:08.630: E/AndroidRuntime(629):  at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1404)
05-31 12:37:08.630: E/AndroidRuntime(629):  at android.app.Instrumentation.execStartActivity(Instrumentation.java:1378)
05-31 12:37:08.630: E/AndroidRuntime(629):  at android.app.Activity.startActivityForResult(Activity.java:2817)
05-31 12:37:08.630: E/AndroidRuntime(629):  at android.app.Activity.startActivity(Activity.java:2923)
05-31 12:37:08.630: E/AndroidRuntime(629):  at android.view.View.performClick(View.java:2408)
05-31 12:37:08.630: E/AndroidRuntime(629):  at android.view.View$PerformClick.run(View.java:8816)
05-31 12:37:08.630: E/AndroidRuntime(629):  at android.os.Handler.handleCallback(Handler.java:587)
05-31 12:37:08.630: E/AndroidRuntime(629):  at android.os.Handler.dispatchMessage(Handler.java:92)
05-31 12:37:08.630: E/AndroidRuntime(629):  at android.os.Looper.loop(Looper.java:123)
05-31 12:37:08.630: E/AndroidRuntime(629):  at android.app.ActivityThread.main(ActivityThread.java:4627)
05-31 12:37:08.630: E/AndroidRuntime(629):  at java.lang.reflect.Method.invokeNative(Native Method)
05-31 12:37:08.630: E/AndroidRuntime(629):  at java.lang.reflect.Method.invoke(Method.java:521)
05-31 12:37:08.630: E/AndroidRuntime(629):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
05-31 12:37:08.630: E/AndroidRuntime(629):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
05-31 12:37:08.630: E/AndroidRuntime(629):  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-04T17:46:08+00:00Added an answer on June 4, 2026 at 5:46 pm

    I think you have not added the activity

    LoginActivity.java
    

    in Android manifest file
    Just add followin code to your AndroidManifest.xml file

    <application>
            <activity
                android:name=".LoginActivity"
                android:label="@string/login_name" >
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
                    <category android:name="android.intent.category.HOME" />
                </intent-filter>
            </activity>
        </application>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making a simple drawing app on Android. I'm using the FingerPaint.java provided with
I'm making an Android app, which gets its information from XML files. I'm filling
I'm making a simple timer as a part of an Android app using a
I am making an android database app in which when i fetch values from
So I'm making my first Android app, using ADT in Eclipse and working with
So I'm making an android app. I am using Eclipse. When I click on
I am making an android app in which i am using google maps which
I'm making an OpenGLES Android app using Android NDK, expanding from android's gljni example,
I am making an android app using android 2.2 and eclipse. There are two
I'm making an android app in which the controls cannot be fit in one

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.