-
Notifications
You must be signed in to change notification settings - Fork 993
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 Build failing in RN 0.59.8 #686
Comments
The same problem. |
I am facing the same problem |
The same problem !! |
Yes Its an issue. |
Same problem . Anyone fix ? |
Same. |
Same here |
I have that problem when I use I installed [email protected] android { It is solved. |
FYI, I have the same problem with RN 0.59.8, then i upgrade to 0.59.9 ( they just released 7 hour ago at the time i wrote this post) and the error is gone. |
@bthuan Thanks man! Upgrading to 0.59.9 seems to somehow fix this bug |
Can we re-open this issue ? Upgrading to 0.59.9 didn't help me at all ... |
After struggling like crazy all day long, I finally found a solution and unfortunately it is not the one provided in this issue. Basically I started having this issue after the androidx update thing. At first I was having issues found on the main repo like this one : facebook/react-native#25294 Then the react-native-fs thing pops up that led me here, after trying to downgrade / upgrade in every react-native version I decided to tackle the problem at the source : if the .NonNull symbol was not found, let's find why but then this led to randomly trying package names till I found the .annotation prop which I found on the androidx package. Then I removed the And then the error disappeared for the react-native-fs package but appeared on several other non-related packages which I managed to fix by doing the same thing. Hope it helps someone. EDIT : Or simply delete all of the annotation found in your packages and it will works (delete the import NonNull/Nullable and where it is used ('@\NonNull' / '@\Nullable') |
@maieonbrix Great! Thank you for the detailed explanation! I'm also having this issue after updating to React Native is migrating to androidx and all packages will need to make the change. |
- Replace `android.support.annotation.Nullable` with `androidx.annotation.Nullable` import. - Thanks to @maieonbrix hard work finding this fix. (itinance#686 (comment))
@maieonbrix I created a PR. Let me know if you'd like me to take it down so you can submit your own. |
thanks @maieonbrix your solution worked for me i am also struggling with androidx update thing. till now do have to update all node packages like react-native-fcm, react-native-fc...etc ??? i want a simple solution |
I think you need indeed to update each of your packages, the simplest solution right now is just to delete the import and the annotation since it is just an annotation. told by @mikehardy here : #691 (comment) |
@maieonbrix I tried doing your method and it's still throwing an btw, my react-native version is |
@darsodango you need to remove both the imports and the annotation here : https://github.com/itinance/react-native-fs/blob/v2.13.3/android/src/main/java/com/rnfs/RNFSManager.java#L624 (delete both If this doesn't work then it's a new issue so open a new one, copy past the full error and I'll gladly try to help. |
Anyone else still getting this error? I've tried all suggested fixes/hacks, nothing is working. I've tried various version of RNFS from "2.13.2" to "2.14.0" and now "2.15.2". Reads: "/node_modules/react-native-fs/android/src/main/java/com/rnfs/RNFSManager.java: "react": "16.6.3", |
i am facing an issue something like that but cann't find solution .Can you help me out ? |
I'm getting this error inside a CI/CD application. I can't edit node_modules. Does somebody have any alternative? |
@juliojeronimo you need to use jetifier either in forward or reverse mode depending on if you are using AndroidX or trying to remain on the support libraries. It will edit node_modules, if that is a hard constraint you need to talk with the people that made it in order to relax the constraint, as a practical matter. |
RNFS Version : 2.13.3
RN Version : 0.59.8
I recently upgraded RN version to 0.59.8 and
react-native-run-android
command failsI am getting the below error message
/node_modules/react-native-fs/android/src/main/java/com/rnfs/RNFSManager.java:11: error: package android.support.annotation does not exist import android.support.annotation.Nullable; ^ /Users/udbhavgoyal/Desktop/codebase/fareye-react/node_modules/react-native-fs/android/src/main/java/com/rnfs/RNFSManager.java:624: error: cannot find symbol private void sendEvent(ReactContext reactContext, String eventName, @Nullable WritableMap params) { ^ symbol: class Nullable location: class RNFSManager Note: /Users/udbhavgoyal/Desktop/codebase/fareye-react/node_modules/react-native-fs/android/src/main/java/com/rnfs/RNFSManager.java uses or overrides a deprecated API.
The text was updated successfully, but these errors were encountered: