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

Fun Facts (Preview doesn't display Android screen) Think I need to move my directory and files. Thanks in advance.

Think I need to move the SDK and or Android files.

Error:(7, 17) Execution failed for task ':app:processDebugResources'.

com.android.ide.common.internal.LoggedErrorException: Failed to run command: C:\Program Files\adt-bundle-windows-x86_64-20140702\adt-bundle-windows-x86_64-20140702\sdk\build-tools\android-4.4W\aapt.exe package -f --no-crunch -I C:\Program Files\adt-bundle-windows-x86_64-20140702\adt-bundle-windows-x86_64-20140702\sdk\platforms\android-21\android.jar -M C:\Users<user>\AndroidStudioProjects\FunFacts\app\build\intermediates\manifests\full\debug\AndroidManifest.xml -S C:\Users\Charles\AndroidStudioProjects\FunFacts\app\build\intermediates\res\debug -A C:\Users<user>\AndroidStudioProjects\FunFacts\app\build\intermediates\assets\debug -m -J C:\Users<user>\AndroidStudioProjects\FunFacts\app\build\generated\source\r\debug -F C:\Users<user>\AndroidStudioProjects\FunFacts\app\build\intermediates\res\resources-debug.ap_ --debug-mode --custom-package com.<user>.funfacts -0 apk Error Code: 1 Output: C:\Users<user>\AndroidStudioProjects\FunFacts\app\build\intermediates\res\debug\layout\activity_fun_facts.xml:1: error: Error: Resource id cannot be an empty string (at 'id' with value '@+id/').

1 Answer

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

Hi Charles! Sorry you're having trouble here. Check out the last line from the error you posted, as it contains a clue to the problem:

C:\Users<user>\AndroidStudioProjects\FunFacts\app\build\intermediates\res\debug\layout\activity_fun_facts.xml:1: error: Error: Resource id cannot be an empty string (at 'id' with value '@+id/').

This has happened to a few students...it looks like you somehow created a blank ID for one of the views in your layout. If you check out the XML view for activity_fun_facts.xml, you'll see exactly the part at the end of this error: @+id/. We don't talk about this in detail in the course, but that's the prefix to declare an ID for a View. After the slash is where we add the ID. You'll need to add an ID wherever this line is occurring. You might need to use a specific ID if you are trying to reference it in your Activity file, otherwise you can name the ID whatever you want.