I'm trying to add ads in my ng-nativescript app using nativescript-admob plugin.I'm following
this guide.I've done everything right but my app is crashing everytime.
here is app.component.ts
`
private androidBannerId: string = "ca-app-pub-kkkkkkkkk/tttttt";//replaced my own id
public createBanner() {
Admob.createBanner({
testing: true,
size: Admob.AD_SIZE.SMART_BANNER,
androidBannerId: this.androidBannerId,
margins: {
bottom: 0
}
}).then(function() {
console.log("admob createBanner done");
}, function(error) {
console.log("admob createBanner error: " + error);
});
}
public hideBanner() {
Admob.hideBanner().then(function() {
console.log("admob hideBanner done");
}, function(error) {
console.log("admob hideBanner error: " + error);
});
}
`
I've updated AndroidManifest.xml as mentioned in guide post.also I'm using nativescript-firebase
plugin by eddy verbruggen.Please help me here.