Capacitor Plugin development how to re-install in order to debug / test changes


I am working on a private Capacitor plugin for an ionic app. I managed to add it to my project (it now sits nicely in node_modules), but any changes I make, the plugin does not get re-installed in the Android build process.

Only thing I can think off is each time to either remove the Android project and add it or remove the plugin manually and reinstall it. But since I am still developing this plugin, it almost seems impossible to test (as it contains physical device API’s, I test in Android Studio)

Surely there must be a better way to automatically re-install my Capacitor plugin when I make code changes?

Did you follow the workflow from the Capacitor docs? If you do, you should be able to just rebuild the Android app after changing the native code of the plugin.

Yeah exactly what I do. I run ionic capacitor sync android command and then rebuild the app in Android Studio, however I don’t see the changes materialise.
Only thought I have is that the original plugin was pulled as a NPM package and I have made changes to it locally. Perhaps its not recognised as being updated and therefor not reloaded in the sync…
I could test that theory I suppose by creating my own local plugin.