-1

I have added a set of xml attributes to the map fragment (Google Maps API for Android) but Android Studio keeps giving me this error: Unexpected namespace prefix "map" found for tag fragment.

How do I solve this error properly (without adding an ignore tag)?

enter image description here

Thanks

Community
  • 1
  • 1
7heViking
  • 7,137
  • 11
  • 50
  • 94
  • is `fragment` tag your root element ? If so can you try wrap it in another `Layout` and move `xmlns:map` to the root `layout` ? – Satyen Udeshi May 07 '16 at 07:09
  • No, it it not my root element. But shouldn't it only be defined inside of the fragment as this is the only place I need it? – 7heViking May 07 '16 at 08:08

2 Answers2

0

Try this also. This error is very similar to yours. Android Google Maps fragment in the xml. I get "Unexpected namespace prefix"

Look at the correct answer.

Community
  • 1
  • 1
0

it happens sometimes, all you need to do is

Clean project then Go in File>Invalidate Caches / Restart and you should be good to go :)

Atiq
  • 14,435
  • 6
  • 54
  • 69