小编Mat*_*ddy的帖子

undefined 不是一个对象(评估 '_reactNative.Text.defaultProps.allowFrontScaling)

尝试在 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)

react-native-android

1
推荐指数
1
解决办法
977
查看次数

标签 统计

react-native-android ×1