material-components-android-codelabs
material-components-android-codelabs copied to clipboard
MDC-103(103-starter) Error: The prefix "tools" for attribute "tools:targetApi" associated with an element type "item" is not bound
Describe the bug Could not build when implement code as instruction. shows error,
Error: The prefix "tools" for attribute "tools:targetApi" associated with an element type "item" is not bound
To Reproduce Steps to reproduce the behavior:
- Download repo
- Checkout
103-starterbranch - Edit
colors.xmlandstyles.xmlfrom example - See error
Expected behavior build should be successful, but it didn't
Codelab details (please complete the following information about the codelab):
- Level MDC-103
- Language Java
- Link https://codelabs.developers.google.com/codelabs/mdc-103-java/index.html#2
update the resources tag in styles.xml as follows
<resources xmlns:tools="http://schemas.android.com/tools">
It will fix the issue.
To fix the bug, I needed to replace the resources tag as follows: