I have an error in react native null is not an object ''evaluating _ReanimatedModule.default.configureProps'
Asked Answered
B

4

6

I installed react native on linux machine.I want to implement createBottomTabNavigator in my practice code.I create 5 folders and index.js inside them. navigate.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);

and main index.js:

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

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

now when I run in genymotion i have error:

  • null is not an object ''evaluating _ReanimatedModule.default.configureProps'

my 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"
  }
}
Brotherton answered 10/9, 2019 at 21:21 Comment(0)
S
7

Check if you've added new ReanimatedPackage() in MainApplication.java under getPackages

and add import from: import com.swmansion.reanimated.ReanimatedPackage;

Susansusana answered 11/9, 2019 at 23:54 Comment(0)
E
6

If you are using react-native 0.6, you will just need to add import com.swmansion.reanimated.ReanimatedPackage; in your MainApplication.java

However it is supposed to add this line automatically as 0.6 supports auto-linking, but for some reason it does not add this line sometimes so please make sure to check!

Just import it and everything will be working .

(Verified on React-Native 0.61.4)

If you are using less than 0.6 than go with the @Maksym Bezruchko solution

Elkeelkhound answered 18/11, 2019 at 10:23 Comment(0)
H
2

In the android folder, android>app>src>main>java>com>app_name>MainApplication.java file: Add the following import

import com.swmansion.reanimated.ReanimatedPackage;

Hope this helps, cheers!

Hecklau answered 3/12, 2020 at 10:52 Comment(0)
R
0

In my case, I'm using expo-dev-client, I had to rebuild my project after installing the reanimated package and configuring the babel plugin because it contains native codes.

Ramonramona answered 11/8, 2022 at 13:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.