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

ShakeDetector Error

In "Making a Simple Android App", he gave me a "Shake Detector" class that I can implement into my program to detect shaking the device, however I have an error message within it.

The line of code with the error is: @Override public void onSensorChanged(SensorEvent event) {

and it states that it must override a superclass method. I don't want to mess up the program, so what do I do?

3 Answers

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

Check out this earlier post about this same issue: http://teamtreehouse.com/forum/adding-a-shake-detector

This appears to usually be a problem with project-specific compiler settings (read all the way to the bottom of the post).

Hope this helps!

That worked! Somehow you always know what is wrong.

Thanks!

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

Ha! Only in these projects that I know so well. :) So glad it helped!