Android Help to beginning programmer
<p>source :</p>

<pre><code>package dreamcode.tutorials.part_two;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
import android.widget.EditText;
import android.widget.Button;
import android.view.View;
import android.view.View.OnClickListener;

public class dic_tut2 extends Activity implements OnClickListener {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                setContentView(R.layout.main);

                Button b = (Button)this.findViewById(R.id.btn_confirm);
                b.setOnClickListener(this);
    }
    @Override        
    public void onClick(View v) {
                TextView tv = (TextView)this.findViewById(R.id.tv_welcome);
                EditText et = (EditText)this.findViewById(R.id.txt_name);

                String text = "Hello, " + et.getText().toString() + ".\n\n";
                text += "Welcome to android development. :)";

                tv.setText(text);
    }
}
</code></pre>

<p>debug information :</p>

<pre><code>Android [Android Application]   
    DalvikVM[localhost:8610]    
        Thread [&lt;3&gt; main] (Suspended (exception RuntimeException))  
            ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord, Intent) line: 2417  
            ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord, Intent) line: 2512   
            ActivityThread.access$2200(ActivityThread, ActivityThread$ActivityRecord, Intent) line: 119 
            ActivityThread$H.handleMessage(Message) line: 1863  
            ActivityThread$H(Handler).dispatchMessage(Message) line: 99 
            Looper.loop() line: 123 
            ActivityThread.main(String[]) line: 4363    
            Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method]  
            Method.invoke(Object, Object...) line: 521  
            ZygoteInit$MethodAndArgsCaller.run() line: 860  
            ZygoteInit.main(String[]) line: 618 
            NativeStart.main(String[]) line: not available [native method]  
        Thread [&lt;13&gt; Binder Thread #2] (Running)    
        Thread [&lt;11&gt; Binder Thread #1] (Running)
</code></pre>

<p>question :
As I Understand this is something wrong with my functions or incompobility for versions of Android. Source codes are taked from version 1.5. And used for Version 2.1. So any way can any one explain or show Right direction, where I can Find correct function creating to the Buttons. Or please fix this code to start work.</p>

<p>My goal :
create function that does something. Version compobility 2.1.</p>

<p>compiler says : </p>

<pre><code>[2011-05-14 12:10:33 - dic_tut2] ------------------------------
[2011-05-14 12:10:33 - dic_tut2] Android Launch!
[2011-05-14 12:10:33 - dic_tut2] adb is running normally.
[2011-05-14 12:10:33 - dic_tut2] Performing dreamcode.tutorials.part_two.dic_tut2 activity launch
[2011-05-14 12:10:33 - dic_tut2] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'my_avd'
[2011-05-14 12:10:33 - dic_tut2] Uploading dic_tut2.apk onto device 'emulator-5554'
[2011-05-14 12:10:33 - dic_tut2] Installing dic_tut2.apk...
[2011-05-14 12:10:39 - dic_tut2] Success!
[2011-05-14 12:10:40 - dic_tut2] Starting activity dreamcode.tutorials.part_two.dic_tut2 on device emulator-5554
[2011-05-14 12:10:45 - dic_tut2] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=dreamcode.tutorials.part_two/.dic_tut2 }
</code></pre>

<p>usefull thing : </p>

<p>I'll throw my 2 cents in. First when working with eclipse there is a bug, it is being worked, between eclipse and the sdk. If you modify a xml file, save and try to build usually you get an error about parsing. If you delete the error from the problems window, then modify a java file and save it. Now it should compile. When I say modify you can add a line and delete it then save it. If you save the java file after the xml file, it should compile. (#6 codeHammer )</p>

<p>I done that and error disapeared = ]]].</p>
