Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Package io.stewan.capacitor.fcm.FCMPlugin does not exist #5

Closed
nikoskip opened this issue May 8, 2019 · 9 comments
Closed

Comments

@nikoskip
Copy link
Contributor

nikoskip commented May 8, 2019

Hi,

I'm trying to use this plugin but I'm having trouble when I try to build on Android. I follow the README guide step by step but it seems that the Java package is not being included. These are the commands I'm running before building on Android Studio:

npm run build
npx cap copy 
npx cap open android

Any ideas?

Thanks!

@stewones
Copy link
Member

stewones commented May 8, 2019

that's kinda weird. did you npm install capacitor-fcm?

also try to invalidate cache and restart on android studio before building

@nikoskip
Copy link
Contributor Author

nikoskip commented May 8, 2019

Yes, I have installed capacitor-fcm:

"dependencies": {
   "@capacitor/android": "^1.0.0-beta.22",
   "@capacitor/cli": "^1.0.0-beta.22",
   "@capacitor/core": "^1.0.0-beta.22",
   "@ionic/core": "^4.3.1",
   "@ionic/vue": "0.0.4",
   "capacitor-fcm": "0.0.5",
   "core-js": "^2.6.5",
   "vue": "^2.6.10",
   "vue-audio-recorder": "^3.0.1",
   "vue-router": "^3.0.6"
 }

I just tried invalidating cache and restarting Android Studio with no luck.

Android Studio is unable to resolve the package 😢

image

@stewones
Copy link
Member

stewones commented May 8, 2019

try this import io.stewan.capacitor.fcm.FCMPlugin;

@nikoskip
Copy link
Contributor Author

nikoskip commented May 9, 2019

It didn't work 😞

image

Any other ideas?

@nikoskip
Copy link
Contributor Author

nikoskip commented May 9, 2019

BTW, this is how I created my project: https://www.smashingmagazine.com/2018/07/mobile-apps-capacitor-vue-js/

I'm using Capacitor to build my native app and not Ionic. Could be the problem?

@stewones
Copy link
Member

stewones commented May 9, 2019 via email

@stewones
Copy link
Member

stewones commented May 9, 2019

@nikoskip

does this plugin module appear in Android studio?

also you must run npx cap sync after a plugin install

@nikoskip
Copy link
Contributor Author

nikoskip commented May 9, 2019

That was the solution, awesome!

I really appreciate your help, thanks for your time 👍

@nikoskip nikoskip closed this as completed May 9, 2019
nikoskip added a commit to nikoskip/capacitor-fcm that referenced this issue May 9, 2019
@adelynx
Copy link

adelynx commented Feb 15, 2021

For the version @capacitor-community/fcm replace import io.stewan.capacitor.fcm.FCMPlugin; with import com.getcapacitor.community.fcm.FCMPlugin;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants