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 Build a Simple Android App (2014) Improving Our Code Adding an App Icon

after I upload the icon for my app, now I get errors and the errors are can't find symbol for R

what should I do now ?? how I fix this problem ? please help !!

the problem below this class

public final class R { public static final class attr { } public static final class dimen { public static final int activity_horizontal_margin=0x7f040000; public static final int activity_vertical_margin=0x7f040001; } public static final class drawable { public static final int ic_launcher=0x7f020000; } public static final class id { public static final int FactsTextView=0x7f080001; public static final int action_settings=0x7f080003; public static final int relativeLayout=0x7f080000; public static final int showFactsButton=0x7f080002; } public static final class layout { public static final int activity_fun_facts=0x7f030000; } public static final class menu { public static final int menu_fun_facts=0x7f070000; } public static final class string { public static final int action_settings=0x7f050000; public static final int app_name=0x7f050001; public static final int hello_world=0x7f050002; } public static final class style { /** Customize your theme here. */ public static final int AppTheme=0x7f060000; } }

3 Answers

In Android Studio go to Build -> Rebuild Project.

I try that but no thing happen ?!!

What is the filename of the image you added?

In your drawable folder, what is the name of the image file? If the image filename is not in the proper format then the R constants class will not be built properly.

I can open the image in android studio but i can't Ran the app because of the R class and the file name is ic_launcher.png and what is the proper format of it ?!!!

Try Build -> Clean Project. Then Make Project.

same thing there are errors ?!!