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
Resource id cannot be an empty string (at 'id' with value '@+id/'). [Solved]
Javier Alvarado16,060 Points
I also had this problem for the relative layout. I just added a name in the id section for the layout itself. I'm not sure why the error popped up in the first place though. I'm fairly certain there was no id section in the xml code before.
Igor Demchenko1,433 Points
Same here: Error:(10, 17) Resource id cannot be an empty string (at 'id' with value '@+id/').
But, on the directory list mistake is shown in java directory, and if you follow the path and open it the three highlighted places are: (R.layout.activity_fun_fact); (R.menu.fun_fact, menu); (id == R.id.action_settings) with all three "R" highlighted in red.
Any ideas how to fix it?
I had the same error but it was under the relative layout (above the first TextView). I just deleted the entire line android:id="@+id/" then just click on build.
To get past this all I did was go to the text tab. Then for that button, I deleted the entire line
android:id="@+id/" then just click on build.