Open thedgbrt opened 8 years ago
Delete folder android/build
manually and try react-native clean
. Hope it works.
EDIT: Can you post error messages?
I've compiled and received notification successfully React Native v0.20
I have fresh v0.20 react native installation and tried adding gcm. It compiled successfully. Done everything like your readme is saying, just changed
from your guidelines:
import com.oney.gcm.GcmPackage; // <- Add this line
import io.neson.react.notification.NotificationPackage; // <- Add this line
...
.addPackage(new MainReactPackage())
.addPackage(new GcmPackage()) // <- Add this line
.addPackage(new NotificationPackage(this)) // <- Add this line
to:
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new GcmPackage(),
new NotificationPackage(this)
);
}
I think readme should be updated with up-to-date new instructions. I will write if i'll have any issues actually recieving notifications.
Hello Howard, congratulations on this great work that is very much needed :)
I am using ReactNative 0.19 and can't seem to find how to import the gcm packages properly in
android/app/src/main/java/com/testoe/MainActivity.java
.Since 0.18, RN's MainActivity.java file has been simplified a lot and we can't just do this anymore :
The code that seem to now be responsible for adding packages is now :
I tried doing this :
but I got errors when doing (clean) builds wit gradle, saying packages were not found on Android. (this might because of #41 but I am not sure)
What's the clean way to fix this?
Thanks