Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Android Build an Interactive Story App (Retired) Finishing the User Interface Customizing the Buttons

Shiina Mashiro
Shiina Mashiro
757 Points

String types not allowed

Under "Customizing the buttons" of Android Development of Ben, when I run the code we make, an error occur to all @drawables of android studio at values.xml. I don't know how but the "R" symbol in my 2 java class under ui package also has an error saying "Cannot Resolve Symbol 'R'".

Here's the error I got that redirects me to values.xml:

C:\Users\Personal\AndroidStudioProjects\InteractiveStory\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.2.1\res\values\values.xml Error:String types not allowed (at 'activity_horizontal_margin' with value ''). Error:Execution failed for task ':app:processDebugResources'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Personal\AppData\Local\Android\sdk\build-tools\23.0.2\aapt.exe'' finished with non-zero exit value 1

Thank You!

Landen Melton
Landen Melton
4,204 Points

It's common for R to not resolve if your project won't compile correctly. That will probably resolve once you get the other issues fixed. Perhaps post your values.xml but it sounds like perhaps you're wrapping the value in "" and in values.xml you don't need to. activity_horizontal_margin should just be a value without quotes I believe.