• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Saloon Keeper
Posts: 7592
177
  • 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".
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic