Describe the bug
After installing Clipboard plugin from Awesome Cordova Plugins, I encountered an error when trying to use the plugin on an APK I created to test the app on my phone. I ran a debug session from my phone using Android Studio, and the logs indicated that the plugin is not installed.
To Reproduce
Steps to reproduce the behavior:
Create Ionic-Angular app in a Nx project with @nxext/ionic-angular
Install Clipboard plugin npm install @awesome-cordova-plugins/clipboard and create a simple copy method
Open in android studion: nx run app-name:open:android
I also ran npx cordova plugin add cordova-clipboard as per error message
Build and APK and install it on the phone
Expected behavior
Expected plugin to work when running on a real device.
Additional context
I don't have much experience with Ionic so if I forgot something please point me in the right way.
Other plugins I installed from Awesome Cordova Plugins have the same "not installed" error showing.
package.json for the app:
I found the problem, according to capacitor documentation instead of npx cordova plugin add cordova-clipboard I had to use npm i cordova-clipboard and then run npx cap sync
Describe the bug After installing Clipboard plugin from Awesome Cordova Plugins, I encountered an error when trying to use the plugin on an APK I created to test the app on my phone. I ran a debug session from my phone using Android Studio, and the logs indicated that the plugin is not installed.
To Reproduce Steps to reproduce the behavior:
npm install @awesome-cordova-plugins/clipboard
and create a simple copy methodnx run app-name:build:production
nx run app-name:add:android
nx run app-name:sync:android
nx run app-name:open:android
npx cordova plugin add cordova-clipboard
as per error messageExpected behavior Expected plugin to work when running on a real device.
Additional context I don't have much experience with Ionic so if I forgot something please point me in the right way. Other plugins I installed from Awesome Cordova Plugins have the same "not installed" error showing. package.json for the app: