Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Msg: TypeError: Cannot read property 'initialize' of undefined #69

Open
inspire22 opened this issue Oct 16, 2020 · 0 comments
Open

Msg: TypeError: Cannot read property 'initialize' of undefined #69

inspire22 opened this issue Oct 16, 2020 · 0 comments

Comments

@inspire22
Copy link

import { Plugins } from "@capacitor/core";
const { AdMob } = Plugins;
import { AdSize, AdPosition } from "capacitor-admob";
export default {
  mounted() {
    console.log("mounted");
    var options = {
      adId: "ca-app-pub-1234/5678",
      adSize: AdSize.BANNER,
      position: AdPosition.BOTTOM_CENTER,
    };
    // ypeError: Cannot read property 'initialize' of undefined

    AdMob.initialize(options);
    console.log("inited", options);

It never reaches "inited", and gives this error in the android studio logcat:
Msg: TypeError: Cannot read property 'initialize' of undefined

Any suggestions please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant