Android FATAL EXCEPTION: main

I'm new to this android programming and do not know where to start with my question nor do I know what I should post here. Here I have the log showed in red in Eclipse. When I start the app, and type in something and click on Send, the app will crash and this log I will get in Eclipse. I'm following this tutorial: Starting Another Activity

Hope someone can help me out

09-10 21:40:45.783: E/AndroidRuntime(25911): FATAL EXCEPTION: main
09-10 21:40:45.783: E/AndroidRuntime(25911): android.app.SuperNotCalledException: Activity {com.example.hello.world/com.example.hello.world.DisplayMessageActivity} did not call through to super.onCreate()
09-10 21:40:45.783: E/AndroidRuntime(25911):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2160)
09-10 21:40:45.783: E/AndroidRuntime(25911):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2229)
09-10 21:40:45.783: E/AndroidRuntime(25911):    at android.app.ActivityThread.access$600(ActivityThread.java:139)
09-10 21:40:45.783: E/AndroidRuntime(25911):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1261)
09-10 21:40:45.783: E/AndroidRuntime(25911):    at android.os.Handler.dispatchMessage(Handler.java:99)
09-10 21:40:45.783: E/AndroidRuntime(25911):    at android.os.Looper.loop(Looper.java:154)
09-10 21:40:45.783: E/AndroidRuntime(25911):    at android.app.ActivityThread.main(ActivityThread.java:4945)
09-10 21:40:45.783: E/AndroidRuntime(25911):    at java.lang.reflect.Method.invokeNative(Native Method)
09-10 21:40:45.783: E/AndroidRuntime(25911):    at java.lang.reflect.Method.invoke(Method.java:511)
09-10 21:40:45.783: E/AndroidRuntime(25911):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
09-10 21:40:45.783: E/AndroidRuntime(25911):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
09-10 21:40:45.783: E/AndroidRuntime(25911):    at dalvik.system.NativeStart.main(Native Method)

Answers


In your onCreate method of DisplayMessageActivity, call this as the first line:

super.onCreate(savedInstanceState);

In fact, your tutorial states this (comment is added by me, though...):

public class DisplayMessageActivity extends Activity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState); // This is important!
        setContentView(R.layout.activity_display_message);
    }
}

Need Your Help

Bash script with multiple string arguments

java string bash

I'm having problem separating two string variables as arguments for a bash script. My bash script takes two arguments like so:

SQL query is kinda slow

sql oracle plsql

I wrote this query a couple weeks ago and it gets the job done, it's just not that fast. I normally write front end JAVA so SQL is not my thing...can you see any places for improvement in this scr...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.