0
votes

I have created one react native app and successfully run in simulator. But it is crashing at launch time in device.

crash log added below. please check it out and help

Module AppRegistry is not a registered callable module (calling runApplication) *** Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: undefined is not an object (evaluating 'u.View.propTypes.style')', reason: 'Unhandled JS Exception: undefined is not an object (evaluating 'u.View.prop..., stack:

1
what is your command? just react-native run-android ?Hamed Keshavarz M
importing PropTypes from react has been deprecated in React 16, I would check all the libraries you're using in your package.json for any issues on their github pages.MattyK14
these are i am using "dependencies": { "axios": "^0.17.1", "react": "16.0.0-beta.5", "react-native": "0.49.3", "react-native-collapsible": "^0.9.0", "react-native-country-picker-modal": "^0.5.1", "react-native-dash": "0.0.7",Arun Kumar P
"react-native-datepicker": "^1.6.0", "react-native-elements": "^0.17.0", "react-native-form-validator": "^0.2.0", "react-native-modal-dropdown": "^0.5.0", "react-native-router-flux": "^4.0.0-beta.28", "react-native-vector-icons": "^4.4.2", "react-navigation": "^1.0.0-beta.13", "react-redux": "^5.0.6", "redux": "^3.7.2", "redux-logger": "^3.0.6", "redux-persist": "^5.5.0", "redux-thunk": "^2.2.0", "rm": "^0.1.8", "validate.js": "^0.12.0" },Arun Kumar P

1 Answers

2
votes

This is caused by an component issue, to fix it go to the component .js and make this changes

import React,{
    PropTypes
} from 'react';

to

import React from 'react';
import PropTypes from 'prop-types';

them find all View.propTypes.style and change to ViewPropTypes.style