-->

Unexpected namespace prefix "xmlns" found for tag fragment on xmlns:map="http://schemas.android.com/apk/res-auto"

Advertisemen
This post share my experience on the error of Unexpected namespace prefix "xmlns" found for tag fragment on xmlns:map="http://schemas.android.com/apk/res-auto".

Recently, I re-check my old project using Google Maps Android API v2, it work without error before. But LogCat show error:

...
E/AndroidRuntime(20411): Caused by: android.app.Fragment$InstantiationException: Unable to instantiate fragment com.google.android.gms.maps.MapFragment: make sure class name exists, is public, and has an empty constructor that is public
...
E/AndroidRuntime(20411): Caused by: java.lang.ClassNotFoundException: com.google.android.gms.maps.MapFragment
...

Then I re-visit the layout xml with MapFragment, error message show Unexpected namespace prefix "xmlns" found for tag fragment on the statement  xmlns:map="http://schemas.android.com/apk/res-auto".



To solve it, correct Java Build Path by right clicking on your project -> Java Build Path, select Order and Export tab, check both Android 4.2.2 and Android Private Libraries, and click OK.


And then clean and build the project.


Similar to the case: java.lang.RuntimeException: Unable to instantiate activity ComponentInfo


Advertisemen

Disclaimer: Gambar, artikel ataupun video yang ada di web ini terkadang berasal dari berbagai sumber media lain. Hak Cipta sepenuhnya dipegang oleh sumber tersebut. Jika ada masalah terkait hal ini, Anda dapat menghubungi kami disini.
Related Posts
Disqus Comments
© Copyright 2017 GENERAL INFO FOR ANDROID DEVELOPMENT - All Rights Reserved - Template Created by goomsite - Proudly powered by Blogger