HMS-Core / hms-react-native-plugin

This repo contains all of React-Native HMS plugins.
https://developer.huawei.com/consumer/en/doc/overview/HMS-Core-Plugin?ha_source=hms1
Apache License 2.0
235 stars 67 forks source link

@hmscore/react-native-hms-push installing only FCM #204

Closed Foskas closed 2 years ago

Foskas commented 2 years ago

Hi,

While installing @hmscore/react-native-hms-push on my React Native App, it's only added to the node_modules the react-native-hms-push-fcm and than the building proccess fails with the following error.

Screenshot 2022-06-08 at 10 36 06

I'm not understanding how can I have the push kit installed correctly so I can use it on my Android React Native App. I followed all the steps from the official docs but there's something wrong with the instalation.

coolleizhu commented 2 years ago

Have you configured these 2 lines in android/settings.gradle file? include ':react-native-hms-push' project(':react-native-hms-push').projectDir = new File(rootProject.projectDir, '../node_modules/@hmscore/react-native-hms-push/android')

Foskas commented 2 years ago

Have you configured these 2 lines in android/settings.gradle file? include ':react-native-hms-push' project(':react-native-hms-push').projectDir = new File(rootProject.projectDir, '../node_modules/@hmscore/react-native-hms-push/android')

Hi cooleizhu,

I did but the problem is I git installed on my node_modules the "react-native-hms-push-fcm" instead of "/eact-native-hms-push"

I did the install with yarn instead of npm, can that be the problem ?

coolleizhu commented 2 years ago

If you just need to use fcm, you just need to follow the configuration in this guide. https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-Guides/aggr-third-parties-0000001238262405

the setting.gradle configuration will be not needed.