You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
您好 我按照你的步骤将RN配置集成到新建的Android项目中弹出两个红屏错误:
1 Cannot read property 'ReactCurrentOwner' of undefined
2 this._lazyCallableModules[name] is not a function
这个是什么原因导致的
您好 我按照你的步骤将RN配置集成到新建的Android项目中弹出两个红屏错误:
1 Cannot read property 'ReactCurrentOwner' of undefined
2 this._lazyCallableModules[name] is not a function
这个是什么原因导致的
package.json
{
"name": "AwesomeProject",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"bundle-android": "react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output app/src/main/assets/index.android.bundle --sourcemap-output app/src/main/assets/index.android.map --assets-dest android/app/src/main/res/"
},
"dependencies": {
"react": "^15.6.1",
"react-native": "^0.46.4"
}
}
index.android.js
'use strict';
import React from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
class HelloWorld extends React.Component {
render() {
return (
Hello, World
);
}
}
var styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
},
hello: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
});
AppRegistry.registerComponent('AwesomeProject', () => HelloWorld);
MyReactActivity.java
public class MyReactActivity extends ReactActivity {
}
MyApplication.java
public class MyApplication extends Application implements ReactApplication {
}
The text was updated successfully, but these errors were encountered: