6 Replies Latest reply on Nov 6, 2017 8:37 AM by ryanskihead

    admob in phonegap build




      I am trying to implement ads in my app.

      I saw in some guidelines that I need to add <gap:plugin name="cordova-admob" source="npm"/> to my config.xml file

      (00. How To Use with PhoneGap Build · floatinghotpot/cordova-admob-pro Wiki · GitHub )

      For some reason the zip file fails once I add this plugin.


      this is how my XML looks like :



      <widget id="XXX.YYY.ZZZ" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">





        <content src="index.html" />

        <plugin name="cordova-plugin-whitelist" spec="1" />


      <gap:plugin name="cordova-admob" source="npm"/>


        <access origin="*" />

        <allow-navigation href="*" />

        <allow-intent href="http://*/*" />

        <allow-intent href="https://*/*" />

        <allow-intent href="tel:*" />

        <allow-intent href="sms:*" />

        <allow-intent href="mailto:*" />

        <allow-intent href="geo:*" />

        <platform name="android">

            <allow-intent href="market:*" />


                  ldpi    : 36x36 px

                  mdpi    : 48x48 px

                  hdpi    : 72x72 px

                  xhdpi   : 96x96 px

                  xxhdpi  : 144x144 px

                  xxxhdpi : 192x192 px


        <icon src="res/android/mdpi.png" density="mdpi" />

        <icon src="res/android/hdpi.png" density="hdpi" />

        <icon src="res/android/xhdpi.png" density="xhdpi" />

        <icon src="res/android/xxhdpi.png" density="xxhdpi" />

        <icon src="res/android/xxxhdpi.png" density="xxxhdpi" />


        <platform name="ios">

            <allow-intent href="itms:*" />

            <allow-intent href="itms-apps:*" />





      Can you please advice what am I doing wrong?

      Why does the build fails with this config.xml?

      What is the best way to add admob plugin?