Android Google Maps fragment in the xml. I get "Unexpected namespace prefix"
I had this problem as well. I did Project/Clean and the error went away and it works fine now.
You have to do two things:
First:https://docs.google.com/document/pub?id=19nQzvKP-CVLd7_VrpwnHfl-AE9fjbJySowONZZtNHzw
Add the dependency to Google Play Services into your project
Project -> Properties -> Android -> Library, Add -> google-play-services_lib
Second: https://developers.google.com/maps/documentation/android/intro
Select Project > Properties
, select Java Build Path
, and navigate to Libraries
.Select Add External Jars
, include the following jar files, and click OK:
<android-sdk-folder>/extras/android/compatibility/v4/android-support-v4.jar
Now my project shows no errors anymore :)
I have the same problem today. I upgraded the SDK last night and did not see this problem before. I had the Android Map V2 sample demo project loaded too and today the "multimap_demo.xml" file is showing the "Unexpected namespace prefix "map" found for tag fragment" error. I applied the xml include suggested and it is working again. Would give it a +1 but got no cred.
UPDATE:I forgot about this problem and reworked my code today and removed the include. Of course the error came back. I found this and added it to the layout in the fragment stanza:
tools:ignore="MissingPrefix"
It seems to at least mask the problem.
Update: This bug apparently happens due to a bug in Android Lint Tool. Refer issue https://code.google.com/p/gmaps-api-issues/issues/detail?id=5002