Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Android Build a Simple Android App with Java Basic Android Programming Adding the OnClick Method

Linda de Haan
Linda de Haan
12,089 Points

Button not responding in emulator

I did everything exactly the way Ben did it in the video. When I run the project in the emulator, the app shows up, but when I click the button nothing happens. It should turn the text from the ants fact to the ostriches fact.

I run it on a Nexus 5X API 27 emulator on Windows 10. Any thoughts on why it doesn't respond?

Linda de Haan
Linda de Haan
12,089 Points

Ok, so I have a work around that does work. If I first run the emulator without the app and then run the app, the emulator shows up under 'connected devices'. I choose that one and then the app shows up in the already running emulator and the buttons work. Probably a bug from Android Studio.