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) Basic Android Programming Accessing Views in Code

Furkan Demirkan
Furkan Demirkan
7,926 Points

"Debug" is not openable in the "r" folder. Please help...

In the video, the r folder has "debug". Well, in mine, debug doesn't have the arrow indicating that you can open it... Im not sure if this is an Android Studio error. When I tried continuing on without opening it, on the code: TextView factLabel = findViewById(R.id.factTextView ); R is in red and the error reads: Cannot resolve symbol 'R'. Should I reinstall Android Studio?

2 Answers

Greg Hesp
Greg Hesp
1,808 Points

Try File -> Invalidate Caches/Restart, and or Build -> Clean Project

I've had this before and the above seems to fix it

Furkan Demirkan
Furkan Demirkan
7,926 Points

Nope, it didn't work. I think something may have gotten corrupted because put Android Studios to my PC from a USB. I will try uninstalling it and downloading it again. Appreciate the help though :)

Hi Furkan,

Excuse me. Had been travelling during the vacations and some code detox time too :)

I've jus shifted to Android Studio infact. But since I've had a quite an experience with Eclipse and given that the logic will remain the same irrespective.

If you cant expand your build and see the R file. It's simply because there was some error while creating the project.

Also did reinstalling help? Usually an error with R resolution occurs when some dependancy goes missing.

I just had the app built and everything worked fine for me.

Another thing try installing from the Android website.

Hope it helps. Ask again if you need help.

Furkan Demirkan
Furkan Demirkan
7,926 Points

Thanks, it works now!

I spent yesterday switching to a new PC, so I didn't really have time to do much else. Literally 10 minutes ago, I decided to try downloading it from the Android website because I formatted my old PCs harddrives to put in my new PC so I lost the old SDK, and I tried opening the R folder and it worked.

Unfortunately, all my progress has been deleted (wasn't really that far into it anyways) and I'll be watching the videos from scratch, but I'm ok with that.

Thanks for the help, much appreciated :)