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 trialAjith vishwanath
Courses Plus Student 295 PointsI am Getting an error like this....pls help me
Ajith vishwanath
Courses Plus Student 295 PointsSry ...now I added the correct link
Ajith vishwanath
Courses Plus Student 295 PointsError:(Error:(21, 9) error: cannot find symbol method setContentView(int)20, 14) error: cannot find symbol method onCreate(Bundle) Error:(22, 47) error: cannot find symbol method findViewById(int) Error:(23, 48) error: cannot find symbol method findViewById(int) Error:(24, 64) error: cannot find symbol method findViewById(int) Error:(18, 5) error: method does not override or implement a method from a supertype Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
Compilation failed; see the compiler error output for details.
6 Answers
Georgi Koemdzhiev
12,610 PointsI see. All of these methods (in red) are methods that are part of the "Activity" class so you need to extend it instead of extending Color. I would suggest extending Activity and creating separate class called "Color" and than using it into this class "MyProject" by creating an instance of the class Color there.
I hope that clears up the picture :p
Ajith vishwanath
Courses Plus Student 295 PointsIm sorry I cant get u properly....this is my first android app ...so I'm a little slow...can you explain me more precisely.
Georgi Koemdzhiev
12,610 PointsOk, so you need to do the following in order to get rid of these error:
change this line "public class MyProject extends Color" to "public class MyProject extends Activity". That will fix this red bits, which are the methods of class "Activity". The Color that you want to use will be in the ColorWheel and I can see that you have an instance if the class already in MyProject, so you dont need "Color".
Hope that helps.
Ajith vishwanath
Courses Plus Student 295 PointsThanks a lot....that was helpful...but now im having problem with "R"...after alteration im having the same red "R",...what to do...can u guide me..
Georgi Koemdzhiev
12,610 PointsTry: Build -> Clean Project and than Build -> Rebuild Project :)
Ajith vishwanath
Courses Plus Student 295 PointsI have sent an email to you regarding the problems in gmail....please send me a solution
Georgi Koemdzhiev
12,610 PointsGeorgi Koemdzhiev
12,610 PointsThere is nothing in the link "The conversation that you requested no longer exists." Can you explain what "error" you are talking about? :)