[android-beginners] Re: Help with error in Android code

2009-10-02 Thread Justin Anderson
Look at the Logcat output... -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Fri, Oct 2, 2009 at 10:15

[android-beginners] Re: Help with error in Android code

2009-10-02 Thread Android_n00b
Try this and let me know if it works: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button loginButton = (Button) findViewById(R.id.login); EditText usernameView = (EditText)

[android-beginners] Re: Help with error in Android code

2009-10-02 Thread sbruno74
I was wondering how to access log messages of errors. I finally found out I had to activate debugging for the app and switch to the debug perspective in Eclipse. Now it seems that I have a null pointer exception on the very line where I setOnclickListener() ! There is no more information. What

[android-beginners] Re: Help with error in Android code

2009-10-02 Thread James Yum
Hi, Can you double-check the id of the Button? I don't think it's being found. Cheers, James On Fri, Oct 2, 2009 at 3:18 PM, sbruno74 sbrun...@gmail.com wrote: It doesn't work. And I had to declare usernameView and passwordView final in order to access them from within the inner class. It

[android-beginners] Re: Help with error in Android code

2009-10-02 Thread sbruno74
On Oct 2, 8:00 pm, James Yum j...@google.com wrote: Hi, Can you double-check the id of the Button? I don't think it's being found. I double-checked. The id of the button is effectively login. Here's the excerpt from my main.xml file: Button android.id=@+id/login

[android-beginners] Re: Help with error in Android code

2009-10-02 Thread sbruno74
Hello, guys I found the error!!! I had a syntax error in the xml file : I had android.id (point) instead of android:id (colon). Thanks, James : you put me on the right path to find why the Button could not be found! Cheers, Stéphane --~--~-~--~~~---~--~~ You