尝试在 android 上加载应用程序以进行本机反应时遇到此问题(它适用于 ios )
似乎导入'react-native'不起作用。我跑了npm install
这是导致错误的文件:
import { Text } from 'react-native'
import DebugConfig from './DebugConfig'
import AppConfig from './AppConfig'
// Allow/disallow font-scaling in app
Text.defaultProps.allowFontScaling = AppConfig.allowTextFontScaling
if (__DEV__) {
// If ReactNative's yellow box warnings are too much, it is possible to turn
// it off, but the healthier approach is to fix the warnings. =)
console.disableYellowBox = !DebugConfig.yellowBox
}
Run Code Online (Sandbox Code Playgroud)