我正在构建一个react原生应用程序,世博会客户端上的事情运行良好。但在闪屏之后,我在日志中看到:‘未捕获错误:调用AppRegistry.runApplication时出错’。
我已经添加了AppRegistry.registerComponent('main',()=>应用程序),这是通过世博会客户端工作的。我是通过expo build:android创建SDK的。
{
"main": "App.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"eject": "expo eject",
"test": "node ./node_modules/jest/bin/jest.js --watchAll"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"@expo/samples": "2.1.1",
"expo": "^32.0.0",
"react": "16.5.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
"react-native-elements": "^1.1.0",
"react-native-material-cards": "^1.0.9",
"react-native-shadow": "^1.2.2",
"react-navigation": "^3.0.9",
"typescript": "^3.4.1"
},
"devDependencies": {
"babel-preset-expo": "^5.0.0",
"jest-expo": "^32.0.0"
},
"private": true
}发布于 2019-03-30 23:49:06
当你输入'expo init appname‘的时候,你输入的名字是'main’吗?
AppRegistry.registerComponent('AppName', () => componentName)如果没有,请参阅this link.
C:\Users\username\AppData\Local\Android\Sdk\platform-tools\从这里打开一个终端。并键入adb reverse tcp:8081 tcp:8081
https://stackoverflow.com/questions/55432964
复制相似问题