-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Button component generate warning #11094
Comments
@adrienbataille u need to link RCTAnimation in ur xcode follow this issue: #10638 |
@sibelius Thanks! |
I did what's on issue #10638, even replaced my NativeAnimation folder with the one in the repo but I still get that warning. |
You need to link RCTAnimation like @sibelius said. Here is how I did it:
I hope this works for you :) |
Thank you @henrikra . I solved the problem following your instructions . |
@henrikra I think you have the right solution, except it doesn't work for me. |
thanks of all, |
Followed @henrikra steps above and now getting the following error. Any idea what I've done wrong? I'm using RN 0.38.0. |
@henrikra, didn't work for me, looks like the solution but didn't work. |
@rgoldiez @manishtpatel I've started a blank new project and upgraded it to RN 0.39.0-rc.0 and it works. Native Animation will be part of the next version of RN (#10783). |
@adrienbataille - I'll give 0.39.0-rc.0 a try. In my case, I can get a clean/new project working with 0.38.0 by manually linking The issue I'm running into is with an existing app that I've been building/releasing since 0.14.0 (but have been upgrading along the way). The app has numerous open source repos for things like icons, routing/navigating, etc. On 0.38.0, I now get the fall back to JS warning, which makes sense. However, when I add and link EDIT: At least in some (maybe all) cases, it seems to be throwing that error when touching a EDIT 2: This seems to be what's causing my issues: 8bb707b. If I remove the |
@rgoldiez I'm new to RN, can you please describe how you remove |
@she-dev - What I did was go to (see line 90 in RN 0.38.0)...
was edited by me to become
|
Not sure what causes that red screen, the steps to link the module are good. What I suggest is if you are having issues with this and can't fix it by linking the NativeAnimation module you can NOT link the module and add this somewhere to ignore the warning until we figure out the issue. console.ignoredYellowBox = [
'Animated: `useNativeDriver` is not',
]; |
@rgoldiez No more warnings around here, thank you c: |
Fixed touchable opacity animation driver ref: facebook#11094 (comment)
The correct path for RCTAnimation is |
@henrikra when I clean the code w.r.t 8th step of your solution above, clean failed and I get this error |
Now when RN 0.39 has been released it includes RTCAnimation by default so that will fix this problem by itself :) |
@henrikra I updated my code to RN 0.39. and there is a same warning messages that 'useAnimatedDriver' is not supported. is it sure that the issue has been solved ? Anyone who solved this issue with 0.39 ? |
See #11094 (comment) |
@henrikra I updated to RN 0.39, the same problem is still there. |
@izhwei @netfish88 Make sure you're using ProjectName, and not ProjectNameTest in the targets dropdown. Turns out, I was on ProjectNameTest at some point (because I had to set signing) |
Updated to RN 0.39 and the warning message got back. Any ideas? Thanks! |
@almirfilho, with 0.39 NativeAnimation folder is moved into libraries, make sure that it is correctly linked to new folder. |
@manishtpatel yup, it's like that since 0.38 actually, and it was fine in 0.38 =/ |
Upgraded to @0.39.1, this warning is still coming up. I think it's an issue in react-native-router-flux though. |
@jcollum - I use react-native-router-flux and am not getting the warning. Note that TouchableOpacity uses animations and has been using the nativeDriver for a couple of releases. So if you don't have RCTAnimation linked properly in your project you will get the warning from TouchableOpacity, and likely other components using useNativeDriver. I too thought I had RCTAnimation linked properly but I still got the warning... it wasn't until I really had it linked properly that the warning went away. |
In that case can you point me to the "right" way to do it? I assume there's one in this thread. You can get a direct link in the "x minutes ago" hyperlink. |
@jcollum - Did you follow these instructions: #11094 (comment) |
That did it! Thanks |
@jcollum - glad to hear. I think the inclusion of RCTAnimation in 0.39.x is for new projects created with |
I did not follow the instructions above, just upgraded the templates. Fixed the useNativeDriver warning for me
|
Yes that is what I said here before #11094 (comment) :) |
Here's what solved it for me: So I went to Build Phases -> Link Binary With Libraries, clicked on the + sign in the bottom, and there under Workspace I found Hope this helps someone... |
@uriklar the fie is actually located in |
@henrikra Words can't describe how grateful i am for this answer. |
Description
Using react native button on iOS create the following warning:
Animated: `useNativeDriver` is not supported because the native animated module is missing. Falling back to JS-based animation. To resolve this, add `RCTAnimation` module to this app, or remove `useNativeDriver`.
Reproduction
Step 1: Add a button in your view,
Step 2: Launch the iOS simulator
Step 3: Click on the button and see the warning.
If it can help, you can find the code here: https://github.com/adrienbataille/test-react-native
Solution
After a little investigation, I found the button component is based on TouchableOpacity for iOS and react-native release notes for 0.38.0 mention this commit: 1bb323e.
I don't if it the origin of the problem, but may be it can have an impact, because it works fine with react-native 0.37.0.
Additional Information
The text was updated successfully, but these errors were encountered: