gpt4 book ai didi

android - 我在 react native null is not an object '' evaluating _ReanimatedModule.default.configureProps' 时出错

转载 作者:行者123 更新时间:2023-11-29 18:27:58 28 4
gpt4 key购买 nike

我在 linux 机器上安装了 react native。我想在我的练习代码中实现 createBottomTabNavigator。我在其中创建了 5 个文件夹和 index.js。导航.js:

import {createAppContainer} from 'react-navigation';
import {createBottomTabNavigator} from 'react-navigation-tabs';

import Profile from './common/pages/profile';
import Home from './common/pages/home';
import Search from './common/pages/search';
import Camera from './common/pages/camera';
import Notification from './common/pages/notification';

const Navigate=createBottomTabNavigator({
Profile:{screen:Profile},
Home:{screen:Home},
Camera:{screen:Camera},
Search:{screen:Search},
Notification:{screen:Notification}
});
export default createAppContainer(Navigate);

和主要的 index.js:

import {AppRegistry} from 'react-native';
import Navigate from './navigate';
import {name as appName} from './app.json';

AppRegistry.registerComponent(appName, () => Navigate);

现在当我在 genymotion 中运行时出现错误:

  • null 不是一个对象''求值_ReanimatedModule.default.configureProps'

我的 package.json:

{
"name": "myinstagram",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"react": "16.8.6",
"react-native": "0.60.5",
"react-native-gesture-handler": "^1.4.1",
"react-native-reanimated": "^1.2.0",
"react-navigation": "^4.0.2",
"react-navigation-tabs": "^2.4.1"
},
"devDependencies": {
"@babel/core": "^7.6.0",
"@babel/runtime": "^7.6.0",
"@react-native-community/eslint-config": "^0.0.5",
"babel-jest": "^24.9.0",
"eslint": "^6.3.0",
"jest": "^24.9.0",
"metro-react-native-babel-preset": "^0.56.0",
"react-test-renderer": "16.8.6"
},
"jest": {
"preset": "react-native"
}
}

最佳答案

检查您是否在 getPackages 下的 MainApplication.java 中添加了 new ReanimatedPackage()

并添加导入自:import com.swmansion.reanimated.ReanimatedPackage;

关于android - 我在 react native null is not an object '' evaluating _ReanimatedModule.default.configureProps' 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57878353/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com