Cordova Admob Pro - ошибка PLAY_SERVICES_VERSION - PullRequest
0 голосов
/ 26 декабря 2018

Я настраиваю Cordova Admob Pro (https://github.com/floatinghotpot/cordova-admob-pro) в моем проекте и получаю ошибку при сборке (https://build.phonegap.com)

ОШИБКА:

Could not get unknown property 'PLAY_SERVICES_VERSION' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

МОЙ КОД:

function adSetter(){
alert(navigator.userAgent);
var admobid = {};
// select the right Ad Id according to platform
if( /(android)/i.test(navigator.userAgent) ) { 
    admobid = { // for Android
        banner: 'ca-app-pub-6869992474017983/9375997553',
        interstitial: 'ca-app-pub-6869992474017983/1657046752'
    };
} else if(/(ipod|iphone|ipad)/i.test(navigator.userAgent)) {
    admobid = { // for iOS
        banner: 'ca-app-pub-6869992474017983/4806197152',
        interstitial: 'ca-app-pub-6869992474017983/7563979554'
    };
} else {
    admobid = { // for Windows Phone
        banner: 'ca-app-pub-6869992474017983/8878394753',
        interstitial: 'ca-app-pub-6869992474017983/1355127956'
    };
}

if(AdMob) AdMob.createBanner( {
    isTesting:true, //Remove this Before publishing your app
    adId:admobid.banner, 
    position:AdMob.AD_POSITION.BOTTOM_CENTER, 
    autoShow:true} );

}
  function onDeviceReady(){
  alert("device ready");
      adSetter();
  }


window.load=function(){
 document.addEventListener("deviceready", onDeviceReady, false);
}

КОНФИГ:

<plugin name="cordova-plugin-admobpro" spec="^2.35.3">
    <variable name="PLAY_SERVICES_VERSION" value="16.0.0" />
</plugin>
<engine name="android" spec="~7.1.4" />
<engine name="ios" spec="~4.5.5" />
...