How to solve error parsing XML unbound prefix with AdMob

Since the day before yesterday I was trying to integrate AdMob into one of my projects but I was stuck with the errors bellow:

You can see in picture picture 1 that Eclipse / MOTODEV was complaining about AdMob component.

Picture 1 – Error parsing xml layout file that contains AdMob component

Android was unable to process xml layout file and so R.java wasn’t generated.

I made a research on Google and I found out a lot of explanations and solutions but none of them worked for me.

As I didn’t found any solution on Google I decided to take one of the most essential tools a developer must pursue, a copy of the sample code provided by AdMob.

After that it was easy cake to solve the problem.

It was missing the declaration of the following line:

So, the fully functional xml file now looks like Listing 1:

Listing 1 – XML layout file that works with AdMob component.

As far as I understand the URI schema points to places where resources can be found in the apk. ads belongs to AdMob classes that are in package com.google.ads in the folder libs.

If I had done this as my first action, I wouldn’t have expended my time for nothing. Hope it helps.

Please, try my games.

Please, try my games, play free on-line games on my site, tweet this post url and share it on facebook, google+ and other social medias.

This entry was posted in android and tagged , , , , . Bookmark the permalink.
  • Pony LAB

    It seems that you are doing lot of stuff for your games if you have so much recommendations! When will be your next game in the market? 😀

    • Hi.

      Currently I’m studying cocos2d-x, JNI and some other stuff. 

      I think that I won’t be able to release any game until April / May 2012.

      Meanwhile I’m posting about stuff I’m learning and problems I’m figuring out.

      Regards.

  • Hi.

    Currently I’m studying cocos2d-x, JNI and some other stuff. 

    I think that I won’t be able to release any game until April / May 2012.

    Meanwhile I’m posting about stuff I’m learning and problems I’m figuring out.

    Regards.

  • Thanks. Indeed helpful.

  • Jim

    nice – thx man 

  • özgür gül

    Thank you..

  • GopherWare

    Exactly what I needed… thanx

  • Thank you. Very nicely explained.

  • Thank u very much

  • yanddam

    thanks

  • Luis Gutierrez Morate

    thank you very much

  • thanks