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
Angel Sosa
892 PointsR.layout.activity (R symbol cannot be resolved) ?????
Hello Im new into Android Dev. having issues with R.layout.activity, R symbol cannot be resolved. Someone please help. Thanks!
5 Answers
Syed Sayem
11,327 PointsI ran into this issue before, and the way I solved it is to clean the project.
From Android Studio, go to File > Invalidate caches / Restart and then Invalidate and Restart
let me know if that work for you?
Syed Sayem
11,327 PointsIt look like @+id/name is missing. Look at you activity_something.xml file which is under layout folder and see if there any error. Make sure id is tag is look like this - android:id="@+id/passwordField"
<Button
android:id="@+id/loginButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/passwordField"
android:layout_alignStart="@+id/passwordField"
android:layout_below="@+id/passwordField"
android:text="@string/login_button_label" />
Angel Sosa
892 PointsWorks like a charm.... Thanks bro!
Angel Sosa
892 PointsBut now having more problems:
Error:(1) Resource id cannot be an empty string (at 'id' with value '@+id/'). Error:Execution failed for task ':app:processDebugResources'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Users/mastechs/Library/Android/sdk/build-tools/23.0.0/aapt'' finished with non-zero exit value 1
?????
Angel Sosa
892 PointsGreat! I have so much to learn... Thanks brother!