react-navigation 4.XX版本安卓模拟器中报错 null is not an object(evaluating _reanimatedModule.default.configureProps)



  • import React from 'react';
    import { Text, View } from 'react-native';
    import { createAppContainer } from 'react-navigation';
    import { createBottomTabNavigator } from 'react-navigation-tabs';
    
    class HomeScreen extends React.Component {
        render() {
            return (
                <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
                    <Text>Home!</Text>
                </View>
            );
        }
    }
    
    class SettingsScreen extends React.Component {
        render() {
            return (
                <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
                    <Text>Settings!</Text>
                </View>
            );
        }
    }
    
    const TabNavigator = createBottomTabNavigator({
        Home: HomeScreen,
        Settings: SettingsScreen,
    });
    
    export default createAppContainer(TabNavigator);
    


  • 执行:react-native link react-native-reanimated 成功,react-native start 报错上面的



  • link完了还要重新编译的(react-native run-android)





  • @晴明 E:\bbq\react\AwesomeProject>react-native link react-native-gesture-handler
    info iOS module "react-native-gesture-handler" is already linked
    info Android module "react-native-gesture-handler" is already linked

    E:\bbq\react\AwesomeProject>react-native link react-native-reanimated
    info iOS module "react-native-reanimated" is already linked
    info Android module "react-native-reanimated" is already linked

    E:\bbq\react\AwesomeProject>react-native run-android
    error React Native CLI uses autolinking for native dependencies, but the followi
    ng modules are linked manually:

    • react-native-gesture-handler (to unlink run: "react-native unlink react-nati
      ve-gesture-handler")
    • react-native-reanimated (to unlink run: "react-native unlink react-native-re
      animated")
      This is likely happening when upgrading React Native from below 0.60 to 0.60 or
      above. Going forward, you can unlink this dependency via "react-native unlink <d
      ependency>" and it will be included in your app automatically. If a library isn'
      t compatible with autolinking, disregard this message and notify the library mai
      ntainers.
      Read more about autolinking: https://github.com/react-native-community/cli/blob/
      master/docs/autolinking.md
      info Running jetifier to migrate libraries to AndroidX. You can disable it using
      "--no-jetifier" flag.
      Jetifier found 957 file(s) to forward-jetify. Using 4 workers...
      info JS server already running.
      info Launching emulator...
      error Failed to launch emulator. Reason: Emulator exited before boot..
      warn Please launch an emulator manually or connect a device. Otherwise app may f
      ail to launch.
      info Installing the app...

    执行后报的



  • 1、0.60以上版本不需要执行link (执行过了就再执行unlink)
    2、编译没有看到报错,但你没有启动模拟器,所以不确定你是否正确安装了



  • This post is deleted!


  • @晴明 谢谢您耐心指导,我在试试


Log in to reply