This week's book giveaways are in the Jython/Python and Object-Oriented programming forums.
We're giving away four copies each of Machine Learning for Business: Using Amazon SageMaker and Jupyter and Object Design Style Guide and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning for Business: Using Amazon SageMaker and JupyterE this week in the Jython/Python forum
or Object Design Style Guide in the Object-Oriented programming forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Stopwatch app not working?

 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • 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: 437
7
Android Tomcat Server Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the log and paste the stacktrace here.
 
Mike Gosling
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • 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: 6079
154
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • 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: 78
  • Likes 1
  • Mark post as helpful
  • send pies
  • 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".
 
Every time you till, you lose 30% of your organic matter. But this tiny ad is durable:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!