Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not able to Import (VSCode)

See original GitHub issue

Describe the bug I can’t import the AdMob Plugin from @capacitor/core with import { Plugins } from "@capacitor/core";const { AdMob} = Plugins;. I am using VSCode and the Object Plugins does not include AdMob and i dont get any autocompletition for it

To Reproduce Steps to reproduce the behavior:

  1. Install with npm i --save @capacitor/admob
  2. Import in Typescript-react File App.tsx with import { Plugins} from "@capacitor/core"; const {AdMob} = Plugins;

Expected behavior I expect VSCode to find the AdMob Class in Plugins

Desktop (please complete the following information):

  • OS: Windows
  • Version core: 2.4.2, admob plugin: ^1.2.5

Additional context I hope i am not just too stupid for it

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

distantecommented, Nov 26, 2020

I have done a PR for the docs, we have to wait until @rdlabo have time to check them.

distantecommented, Nov 23, 2020

Try this:

import { AdMobPlugin } from '@capacitor-community/admob';
import { Plugins } from '@capacitor/core';

const adMobPlugin = Plugins.AdMob as AdMobPlugin;
Read more comments on GitHub >

github_iconTop Results From Across the Web

python - Pylint "unresolved import" error in Visual Studio Code
This issue was because of the Python interpreter. You need to select the interpreter in Visual Studio Code using Shift + Ctrl +...
Read more >
Fix Python Unresolved Import in VSCode - LinuxPip
"Unresolved Import" is an error message produced by VSCode, not Python itself. The message simply means that VSCode cannot detect the ...
Read more >
Import Errors in Python: No Module Named “Module_Name ...
Firstly, open up visual studio code and in your terminal check whether you are in your virtual environment. You can move into your...
Read more >
Python unresolved import: How to Solve Pylint Error
To solve unresolved import error in Python, set your Python path in your workspace settings. If you are working with Visual Studio Code...
Read more >
Linting | Python in Visual Studio Code
1. Unable to import (pylint) · Open the terminal window · Activate the relevant python virtual environment · Ensure Pylint is installed within...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found