Cannot figure out how to use plugins #3128
-
Hi all, super new to this, so sorry if it's something really easy. I understand the basics of Capacitor, I've been able to export a React app to a Native app without many problems. I now want to use some location services, I've decided to go with this plugin for no particular reason. Now the plugin itself doesn't really explain what I'm supposed to do to use it. If I try to use the code it's telling me in the repository I just get a bunch of So I go to the Capacitor docs for "Using plugins". This page then links me to "Plugins" page which in return explains how to create a plugin from scratch, which isn't really what I'm looking for. How do I use plugins? Is there a part of the docs I've missed? Do I need to add support for Typescript to use plugins? How do I use Cordova plugins? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
No apology needed - we'll add more details to that Using Plugins page shortly. In the meantime -
Try those steps - does that work? |
Beta Was this translation helpful? Give feedback.
-
@dotNetkow Thank you for replying! Doing this outputs the following error when trying to run the app via Android Studio:
The app runs fine after removing the plugin. Unsure if that's the plugin's fault or I'm missing an npm package. |
Beta Was this translation helpful? Give feedback.
-
Okay so I think I've managed to fix it. I completely uninstalled Android Studio and reinstalled it from snap. I'm unsure how useful this was to fixing it but I wanted to be sure nothing had gone wrong with the installation. The problem (I think) was caused by my Gradle Sync not working. It wasn't triggering automatically and even when manually started it wouldn't complete (even though it returned no errors). After the install I still need to manually Sync to have new plugins appear, but aside from that it's now working just fine! |
Beta Was this translation helpful? Give feedback.
-
Update
at build.gradle worked for me. |
Beta Was this translation helpful? Give feedback.
Okay so I think I've managed to fix it. I completely uninstalled Android Studio and reinstalled it from snap. I'm unsure how useful this was to fixing it but I wanted to be sure nothing had gone wrong with the installation.
The problem (I think) was caused by my Gradle Sync not working. It wasn't triggering automatically and even when manually started it wouldn't complete (even though it returned no errors).
After the install I still need to manually Sync to have new plugins appear, but aside from that it's now working just fine!