Open PingShuPeng opened 6 years ago
进入源代码修改MapView.js PropTypes导入换成这个 import PropTypes from 'prop-types'; 估计是这个问题
import React ,{PropTypes}from'react';这句话不能用了,react直接把Proptypes放到单独的库里面了。改为
const PropTypes = require('prop-types');这样的话很多第三方库都要改,最好的方式是直接将react的index改为:
'use strict';
import PropTypes from'prop-types';
letReact;
if(process.env.NODE_ENV ==='production') {
React = require('./cjs/react.production.min.js');
}else{
React = require('./cjs/react.development.js');
}
React.PropTypes = PropTypes;
module.exports = React;
、、、、、、、、、、、、、、、、、、、、、
undefined is not an object (evaluating 'a.PropTypes.bool') Module AppRegistry is not a registered callable module (calling runApplication) 11-29 16:45:07.045 10616-10719/com.mymall E/AndroidRuntime: FATAL EXCEPTION: mqt_native_modules Process: com.mymall, PID: 10616 com.facebook.react.common.JavascriptException: undefined is not an object (evaluating 'a.PropTypes.bool'), stack: