-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Android build error with [email protected] #158
Comments
I'm having the same error. |
Are you using other external packages that require push? Like Firebase? |
@rturk, good idea, I disabled all other external packages. Unfortunately the error is still present. |
Same. I'm encountering this error with rn 0.30.0 and 2.0.2 of the app. Has anyone gotten this to work correctly? |
same here |
Rolling back to 2.0.1 fixed it for now, while still being on rn 0.30.0 |
Had this problem also, had to
After than 2.0.2 + rn 0.30.0 works properly. |
I'm having the same error :( : "react-native": "^0.30.0", "react-native-push-notification": "^2.0.1" error: method does not override or implement a method from a supertype |
Did you guys all upgrade from a previous version of RN? For me the error was fixed after I ran |
I tried [email protected] with 2.0.2 (commit #0b019670) and it requires to remove the |
Re-running the upgrade, and ensuring I got everything, worked for me. |
Everything is updated and this is the error I get trying to compile it with [email protected]:
|
I found out that my configuration in |
I have the same issue on 0.33-rc but it works on 0.32. Not sure what it's coming from... |
I am getting this with RN0.33.0 and neither |
I've solved this by opening project in Android studio. Open RNPushNotification.java. Hit Ctrl+I (Implement methods). Choose onActivityResult. Delete former onActivityResult and save. |
I looked at your commit - as far as I can see, nothing was actually changed except some new lines. Not sure how that is going to fix this issue? |
@julienvincent that is actually the strange part. Compiler was complaining about not implementing method onActivityResult. So I've opened Android Studio -> implements method. It created new method onActivityResult and I deleted old declaration. Compiler was happy. And just after that I've realised the method declaration is same, so actually only empty lines were added. Very strange. However when I install module from npm, it happens again.
|
Ok. I've found that npm version is not same as master on github (but version numbers are the same). I've only checked build.gradle and it differs. Maybe that is the reason. Installed from github instead of npm and no compilation error occured. So I would say npm version should be reuploaded. |
The github version would differ due to the repo owner doing additional work on the project since last release. But I agree, it would be nice if @zo0r could release a new patch version to fix this problem. In the meantime I have found that using |
Ok got you. So the problem is already fixed in master. So publishing new version to npm will also fix this problem. |
Yes it would seem so :) I think I will switch to installing from github as well for now. |
Just published 2.1.0 |
@zo0r Thanks! 👍 |
I have And same error:
How can i fix it? |
@zo0r just commented saying he published |
But |
2.1.0 may still work on rn29, though I am not too sure. |
I'm in the process of merging a different PR but can look at this after. Think it should be possible to get it working on both 33 and earlier. |
I upgrade the RNPN @zo0r some idea of can i fix it? |
@luisfuertes for RN v0.29.1 try using 2.0.1 |
I've just pushed PR #172 to master, along with a load of fixes to it. Included was a temporary change to make it compile on rn 0.32. Can someone who's on RN 0.33 please check if master still works for them? |
@zo0r before |
That's good that it works on RN0.33 because I've been testing on rn0.32 (haddn't tried 33 yet). Hold off on the release though, it was quite a big change. Wouldn't mind getting a few people to try it first. To fix the incompatibility problem I took out the The annotations are only a compile-time tool and have no effect at runtime. In a sense they're totally optional. IMO it's always a good idea to use them, commenting them out is a hack, but until its decided that this project only supports the latests RN (maybe?) then I guess we can leave both implementations of the method in. I'd suggest that supporting more than 1 version of RN is going to be a nightmare. Perhaps each time RN becomes incompatible we simply make a branch for the old one, and keep master compatible with the latest RN? Then just link to the branch on the README file for this people who want the old version. |
In my opinion there is no point for later versions of the project to support earlier versions of RN. As long as which package versions support which versions of RN is documented, then it will be better to provide support for only the current version of RN in master. |
I'm inclined to agree. If people want new features and fixes they need to upgrade their version or RN. Otherwise they're free to fork and maintain their own version. |
For compile project i have to delete one parameter in OnActivityResult I change
for
Now project compile, but i have to try if it works. EDIT: function |
Master currently contains both methods, but as I think the approach is to only support the latest RN that won't be the case going forward. |
was using RN 0.33 and upgrading to react-native-push-notification |
I am using React native 0.47.1 with react-native-push-notification 3.0.0. When trying to build I get
works with rn 0.46.4 |
I get this error when building with
[email protected]
:Quick link to line
The text was updated successfully, but these errors were encountered: