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 (retired 2014) Pretty Little Things Animating the Crystal Ball

Gábor Molnár
Gábor Molnár
4,787 Points

onPause() method issue

Hi Ben! I have an issue with the CrystalBall App. If I use the @Override before the onPause() method, the Eclipse can't compile, because an error. If I delete it the @Override (because the quick fix option is: remove the @Override....) then the Eclipse can compile and I can run the app on my device or on emulator and works very well of course. But when I close it, the shakeLinstener is always working and playing the sound by every shaking... and I can use only the Force to STOP option by the application menu.... Have you some advice for this? Thanks before and kind regards! Bye Gábor

2 Answers

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

This is usually due to a weird project setting. See if this answer on StackOverflow about updating the Java compiler level helps you use the @Override, and then we'll go from there: http://stackoverflow.com/a/2335752/475217

Gábor Molnár
Gábor Molnár
4,787 Points

Hi Ben,

thanks for the answer.... :) But the issue was on other place....actully with my eyes :) the OnPasue() is really not works with capital O.... but now everything is OK :)

Have a nice day! Gábor