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 trialIsmael Ortega
443 PointsProblem / error with Shake Detector
When I include the ShakeDetector.java class into my project it shows an error highlighting the first statement 'package com.example.crystal.ball;' and the error says 'The declared package "com.example.crystal.ball" does not match the expected package "com.example.crystalball" ΒΏDoes anybody knows what is happening? and how can I fix it?
3 Answers
John Coffin
10,359 PointsI had the same issue. When Ben created this class, he must have used a different package name (which was com.example.crystall.ball). All that you will need to change this one line of code to match the package name that you used when you created your project (which is com.example.crystallball).
This is fairly typical step when importing a class. It happens in one of the other projects and Ben explains it as a step (although the package name is com.teamtreehouse.ribbit ... or something like that).
Ismael Ortega
443 PointsThank You very much John. I did what you said. I changed the com.example.crystal.ball for com.example.crystalball (without the last dot) and it worked out!!
aliciamcnichols
1,068 PointsI had the same problem. Thanks John!
Jordan Welch
1,771 PointsJordan Welch
1,771 PointsThanks man!