react-native 调用 TouchableOpacity (触摸透明) 时报了一个警告

`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`.

字面意思看,是本地动画模块丢失,一个暂时的解决方案是:

找到项目目录下文件 node_modules/react-native/Libraries/Components/Touchable/TouchableOpacity.js

将 90 行代码

{toValue: value, duration: 150, useNativeDriver: true}

改为

{toValue: value, duration: 150, useNativeDriver: false}

并写上修改原因.
原文地址:https://www.cnblogs.com/davidyff/p/6113674.html