配置中使用google adMob的phonegap构建错误

时间:2016-04-24 19:41:00

标签: cordova admob phonegap-plugins phonegap-build phonegap-admob

我的config.xml文件

<?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="dev@onsen.io" 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>

当我尝试从build.phonegap.com构建时,出现以下错误:

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

confic.xml有什么问题? 请帮忙

修改: 将admob插件行更改为此仍然会出现格式错误的confic.xml&#39;错误

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

1 个答案:

答案 0 :(得分:1)

Phonegap插件已更新为新命名(cordova -...)。您需要更改该行:

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

另一个:

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

请参阅cordova/phonega admob plugin documentation here