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 trialDaniel Casamassima
624 PointsCrystal Ball
Hi all, Need some help with the following error being flagged on this line answerLabel.setText(answer);
it detect the period is an error, Description Resource Path Location Type Syntax error on token(s), misplaced construct(s) MainActivity.java /CrystalBall/src/com/example/crystalball line 27 Java Problem
the second error detected is the answer, Description Resource Path Location Type Syntax error on token "answer", VariableDeclaratorId expected after this token MainActivity.java /CrystalBall/src/com/example/crystalball line 27 Java Problem
Intellisense seems to be unstable in this line. It should appear once the period is pressed but not go. checked all the setting and seems to be fine. I have also checked intellisense on other parts of the code and works fine.
any suggestions? these two errors prevents me from testing the code. Thanks Daniel
1 Answer
Aaron Arkie
5,345 PointsCan you please post your code so i can have a look, check out the markdown cheatsheet above post answer button to see how to do so!:) its a syntax error so it might be easy to fix. You can also try going on eclipse clicking project then clean and select the project and it will rebuild it for you. Sometimes eclipse messes up and the folder may need to be cleaned.
Chris Campisi
1,640 PointsChris Campisi
1,640 PointsI would make sure to double check the opening/closing { } and ( ) . Intellisense works when things are in scope. If it can't find it that means something is breaking that scope.