material-components-android-codelabs icon indicating copy to clipboard operation
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

Open zahedul opened this issue 6 years ago • 2 comments

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:

  1. Download repo
  2. Checkout 103-starter branch
  3. Edit colors.xml and styles.xml from example
  4. 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

zahedul avatar Mar 19 '19 05:03 zahedul

update the resources tag in styles.xml as follows

<resources xmlns:tools="http://schemas.android.com/tools">

It will fix the issue.

saqibrazzaq avatar Apr 21 '19 08:04 saqibrazzaq

To fix the bug, I needed to replace the resources tag as follows:

zufus avatar Feb 27 '22 21:02 zufus