Uncaught (in promise) Error: "Preferences" plugin is not implemented on android

Using quasar, capacitor 6 with preferences plugin. I have installed preferences (npm install @capacitor/preferences) and have also ran a npm cap sync (although this happens when quasar runs).

I can see that in my src-capacitor/node-modules/@capacitor directory I have a “preferences” directory with what I can only assume to be the preferences package. I have done gradle sync numerous times, have closed Android Studio, restarted my device but in the app I am faced with:

ncaught (in promise) Error: “Preferences” plugin is not implemented on android
at createPluginMethod (index.js:188:23)
at index.js:195:32

I can for the life of me not figure out what is happening or why I am getting this error as preferences is definately installed and synced. In Android Studio I can see under app/capacitor-preferences

Any ideas what I’m doing wrong?

Try this guide - Troubleshooting Android Issues | Capacitor Documentation. It’s got a few more items to try like Clean/Rebuild and Invalidate Cache.

Thank you, I have gone through all of the following steps:

  • Gradle Sync
  • Clean and rebuild
  • Invalidate Caches (with all of the options)
  • I have deleted the entire node-modules directory in src-capacitor and did a fresh npm install

During interaction, the same error applies:

http://10.0.10.133:9500/src-capacitor/node_modules/@capacitor/core/dist/index.js - Line 188 - Msg: Uncaught (in promise) Error: “Preferences” plugin is not implemented on android

What version of @capacitor/preferences do you have installed?

Running core 6.1.2 and preferences 6.0.2