Closed Kisepro closed 6 years ago
I don't know why but the "react-native link" was not adding the line "compile project(':react-native-onesignal')" I did it manually and it's now working
Another minor problem is that the link action add each times the following lines
import com.geektime.rnonesignalandroid.ReactNativeOneSignalPackage;
new ReactNativeOneSignalPackage(),
The issue can be closed
@Kisepro I'm unable to reproduce this issue. In my attempt, I created a completely new react-native project and manually added the react-native-onesignal SDK following the instructions in the readme.
Did you follow the guidance in the readme precisely to the letter? If not, how did you do it?
@Nightsd01 Yes I followed it precisely, and doing it on a completly new react-native project it works also for me.
It's really specific to my project I think and I managed to make it works when I understood why so I guess you shouldn't lose your time on that issue.
I suspect this could be because of "react-native-push-notification" linking, I had another conflict with i this package like this compile instruction
dependencies {
compile ('com.google.android.gms:play-services-gcm:8.1.0') {
force = true;
}
...
}
I don't need this package anymore so it was not a big deal to remove it
I am glad to hear that resolved your issue.
We have a onesignal grade plugin that can resolve issues similar to this. It needs to be placed at the top of the App gradle file:
plugins {
id 'com.onesignal.androidsdk.onesignal-gradle-plugin' version '0.8.1'
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin
Hello,
I already saw this issue referenced and I tried the solutions proposed but it's still not working for me. It's working on a empty project when install it but not working on my main project, so I'm wondering what could be the problem ?
However I can find the correct com.geektime.rnonesignalandroid package in node_modules\react-native-onesignal\android\src\main\java\com\geektime\rnonesignalandroid so I can't understand why it's not found.
react 16.0.0 react-native 0.54.2
My MainApplication.java
The ReactNativeOneSignalPackage.java in my nodes_modules