Error in test launch of your first android app

So are you new to android and your facing problem in test launch of your first app that has not been finished yet? Well if it’s it something like the following lines then I have a simple approach that you should follow.

Actually when I run my code I got a “force close” error on the screen and the error log showed me the above crazy bunches of lines.

Consider the following code you have. You see the first method that we have overridden is the one that actually launches the application and the second one starts the activity. Well this method is somewhat misplaced right now.

I removed this onStart() method and viola! my application started running without any bugs.

but this is not what the best you do. ofcourse you want this method and in a runnning condition. Go back to the code and make sure that you have used the super keyword i.e. if you are to override a method called onStart(), you have to put your code in the following manner:

super.onStart();
System.out.println("On Start activity!!");
//other code goes here...

P.S. Keep in mind that for every Activity you have to register it into your AndroidManifest.xml file.

Advertisements

2 thoughts on “Error in test launch of your first android app

    • Actually this post is specific to the error that arose due to missing “super” keyword.
      But one must keep in mind that usually when you make a new activity class, you have to register it in that Manifest file. Otherwise you will get an error during launch of that activity.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s