Whenever I try and build my project, I get this error:
Android resource compilation failed
Output:
C:\\Users\\smart\\AndroidStudioProjects\\ShoppingList\\a
I got something similar where the Android resource compilation failed.
error: - inner element must either be a resource reference or empty.
I'm seeing some posts that suggest deleting a "ids.xml" file and that fixes the issue. While that may fix it, you may be doing more harm since code may refer to that id tag.
I fixed my issue by updating the "ids.xml" file from:
- id
To:
Notice how the Item tag is a self closing xml element now. This is the correct way to list id's within the "ids.xml" file now. You can refer to the official Android documentation for this as well.
Cheers!