• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Eclipse Android Programming/Buttons

 
Chung Siu
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

**Android Manifest**






That up there is my code. When ever I click the button that code is linked to. my app just crashes. I am very new to android programming so if someone could help me out in simple terms, that would be great


Thanks!
 
Ron McLeod
Bartender
Pie
Posts: 1050
65
Android Eclipse IDE Java Linux MySQL Database Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are you expecting to happen when you click the button widget?
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Chung,

Welcome to the Ranch!

I don't see anything wrong with the code you posted, but it isn't complete. You need to use LogCat to find out what exception or error is happening that causes the crash. If you are using an IDE then there should be a view for LogCat, and if not there is an ADB command to view it.

Also, in the future, please UseCodeTags (<- read link for how), it makes the code easier to read.
 
Ron McLeod
Bartender
Pie
Posts: 1050
65
Android Eclipse IDE Java Linux MySQL Database Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ron McLeod wrote:What are you expecting to happen when you click the button widget?

The reason I asked this question was, after fixing the errors, the behaviour will be that the each time the button is clicked, another instance of the same Activity will be created and placed on the top of the back stack. This is something you wouldn't normally want to do.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic