• 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:

Stopwatch app not working?

 
Ranch Hand
Posts: 149
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I apologize if there's already a thread with this or similar problem I'm currently facing. I just couldn't find it.

I'm trying to simulate simple Stopwatch app, from Head First Android Development book.

I am not sure why I'm getting info that app has stopped working.

Here is the activity code:



And here is layout code:



Everything is the same as in the book, but I keep getting "App has stopped working".
 
Rancher
Posts: 660
10
Android Tomcat Server Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check the log and paste the stacktrace here.
 
Mike Gosling
Ranch Hand
Posts: 149
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you mean Event Log? I'm new to Android Studio, so everything is mixed up right now

Here is what I got from Event Log:

 
Bartender
Posts: 7488
171
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, the logcat where messages from the device (or emulator) appear. Not sure how that might be named in Android Studio, though.
 
Mike Gosling
Ranch Hand
Posts: 149
1
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Damn, my bad! In activity I referenced TextView component with an id "time_view", while that same component has in xml file id of "text_view".
 
get schwifty. 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