• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

Eclipse Android Programming/Buttons

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Marshal
Posts: 4172
555
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What are you expecting to happen when you click the button widget?
 
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Marshal
Posts: 4172
555
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
If tomatoes are a fruit, then ketchup must be a jam. Taste this tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic