frequent issues arising in android view, Error parsing XML: unbound prefix

I had this same problem.

Make sure that the prefix (android:[whatever]) is spelled correctly and written correctly. In the case of the line xmlns:android="http://schemas.android.com/apk/res/android" make sure that you have the full prefix xmlns:android and that it is spelled correctly. Same with any other prefixes - make sure they are spelled correctly and have android:[name]. This is what solved my problem.


I'm going to add a separate answer just because I don't see it here. It's not 100% what Pentium10 asked for, but I ended up here by searching for Error parsing XML: unbound prefix

Turns out I was using custom parameters for AdMob ads like ads:adSize, but I hadn't added

    xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"

to the layout. Once I added it it worked great.


A couple of reasons that this can happen:

1) You see this error with an incorrect namespace, or a typo in the attribute. Like 'xmlns' is wrong, it should be xmlns:android

2) First node needs to contain: xmlns:android="http://schemas.android.com/apk/res/android"

3) If you are integrating AdMob, check custom parameters like ads:adSize, you need

xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"

4) If you are using LinearLayout you might have to define tools:

xmlns:tools="http://schemas.android.com/tools"