Shahid Karimi
Shahid Karimi

Reputation: 4357

phonegap build error with google adMob in config

my config.xml file

<?xml version='1.0' encoding='utf-8'?>
<widget id="io.onsen.helloworld" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>Onsen UI Project</name>
    <description>
        Onsen UI project to create fancy user interfaces for hybrid mobile applications. It uses uses Apache Cordova to help you build an app that targets multiple mobile platforms: Android, iOS, Windows, and Windows Phone.
    </description>

    <author email="[email protected]" href="http://onsen.io">
        Onsen UI Team
    </author>
    <content src="index.html" />
    <access origin="*" />
    <engine name="android" spec="~4.1.1" />
    <gap:plugin name="com.admob.google" version="2.0.2" source="plugins.cordova.io" />
</widget>

When I try to build from build.phonegap.com, I get the following error:

plugin source unsupported: com.admob.plugin from plugins.cordova.io

What is the wrong with the confic.xml? Please help

EDIT: Changing the admob plugin line to this still gives 'malformed confic.xml' error

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

Upvotes: 1

Views: 385

Answers (1)

Miquel
Miquel

Reputation: 8959

Phonegap plugins has been updated to new naming (cordova-...). You need to change the line:

<gap:plugin name="com.admob.google" version="2.0.2" source="plugins.cordova.io" />

With this other one:

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

See cordova/phonega admob plugin documentation here

Upvotes: 1

Related Questions