React Native–Animated:`useNativeDriver`is not supported because the native animated module is missing

react-native init 项目,在运行中报错
React Native--Animated:`useNativeDriver`is not supported because the native animated module is missing
React Native--Animated:`useNativeDriver`is not supported because the native animated module is missing

解决方法

  1. 打开Xcode项目,点击Libraries文件夹右键Add Files to "项目名"
    React Native--Animated:`useNativeDriver`is not supported because the native animated module is missing

  2. RCTAnimation.xcodeproj添加到Libraries
    React Native--Animated:`useNativeDriver`is not supported because the native animated module is missing

  3. 然后把libRCTAnimation.a文件拖拽到 Build Phases/Link Binary With Libraries下即可,重新运行项目就没有警告了
    React Native--Animated:`useNativeDriver`is not supported because the native animated module is missing

Related Posts

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注