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


Shaking things up

howdy again, im doing the shaking things up part of the android crystal ball app and am getting errors in the code with ShakeDetector.java and MainActivity.java, its just one line on each where it doesnt like the @Override

for both errors it suggests the override be removed and on hover it states..

"The method onShake() of type new ShakeDetector.OnShakeListener(){} must override a superclass method"

ive even tried copying and pasting the project files but got the same error

help much appreciated

Laurie Williams
Laurie Williams
10,174 Points

To resolve this issue, Go to your Project properties -> Java compiler -> Select compiler compliance level to 1.6-> Apply.

This worked for me.

1 Answer

Ben Jakuben
Ben Jakuben
Treehouse Teacher

This is a common problem with Eclipse. For some reason the Java compiler settings get mixed up, though I can never pinpoint why. It's a common question on StackOverflow--hopefully one of these answers can help you: