Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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