ionic admob free run android does not work

0

when I install admob free on ionic it does not run. play service error.

do not create apk no ionic cordova run andorid.

$ ionic cordova plugin add cordova-plugin-admob-free
$ npm install --save @ionic-native/admob-free

.

import { AdMobFree, AdMobFreeBannerConfig } from '@ionic-native/admob-free';


constructor(private admobFree: AdMobFree) { }


...


const bannerConfig: AdMobFreeBannerConfig = {
 // add your config here
 // for the sake of this example we will just use the test config
 isTesting: true,
 autoShow: true
};
this.admobFree.banner.config(bannerConfig);

this.admobFree.banner.prepare()
  .then(() => {
    // banner Ad is ready
    // if we set autoShow to false, then we will need to call the show method here
  })
  .catch(e => console.log(e));
    
asked by Carlos 15.06.2018 в 00:40
source

1 answer

0

I found the answer.

I was on a git page link

just change the .... playservice

Riyaz0001 commented 3 days ago • Change the platform / project.properties file, simply replace the version number and then add the + sign.

Example: before

cordova.system.library.2=com.google.android.gms:play-services-ads:11.8.0

After

cordova.system.library.2=com.google.android.gms:play-services-ads:+

and simply use this command in CLI: cordova clean androidy compile again.

I hope to solve this problem for the cordova-plugin-admob-free plugin.

    
answered by 15.06.2018 / 00:45
source