I installed mopub-cordova plugin and declared MoPub on home.ts put i’m getting error is showing MoPub function not defined.
home.ts
declare let MoPub: any; @Component({
selector: ‘page-home’,
templateUrl: ‘home.html’
})
export class HomePage {
ad_units = {
banner:"xxxxxxxxxx",
interstitial:"xxxxxxx"
}
constructor(public navCtrl: NavController, public platform: Platform) {
this.platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
Well, when i try to run it on the device it is showing error
BUILD FAILED in 41s
at ChildProcess.whenDone (…/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
I try many plugins, same issue couldn’t find function and can’t deploy on the android device.
then i saw article on the stackOver forum and i follow the instruction there but have same error,
i think problem for how to call function on the plugin.