0

cuando instalo admob free en ionic no corre. error de play service.

no crea 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));

1 respuesta 1

0

Encontre la respuesta.

estaba en una pagina de git https://github.com/ratson/cordova-plugin-admob-free/issues/141

solo cambie el .... playservice

Riyaz0001 comentó 3 days ago • Cambio el archivo de plataforma / proyecto.propiedades , simplemente reemplace el número de versión y luego agregue el signo + .

Ejemplo: antes

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

Después

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

y simplemente use este comando en CLI: cordova clean androidy compila de nuevo.

Espero resolver este problema para el complemento cordova-plugin-admob-free .

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge you have read our privacy policy.

¿No es la respuesta que buscas? Examina otras preguntas con la etiqueta o formula tu propia pregunta.