React Native Android:screenPhysicalPixels.width未定义

奥古斯丁·里丁格

我最近升级到RN 0.20,现在尝试加载我的应用程序时抛出以下异常:

undefined is not an object (evaluating 'screenPhyisicalPixels.width')
<unknown>
index.android.bundle?platform=android& def=true:32950
requireImpl
index.android.bundle?platform=android& def=true:76
_require
index.android.bundle?platform=android& def=true:36

显然导致以下文件的JS错误:

node_modules/react-native/Libraries/Utilities/Dimensions.js at line 30

有关信息,我没有在我的应用程序中使用Dimensions API。

有什么提示吗?

奥古斯丁·里丁格

我不清楚是什么命令确切地执行了什么操作,但是由于结合了@ mr-brown和@ matija-grcic的答案,因此在执行以下步骤后将其修复:

  1. 设置"react-native": "^0.20.0",package.json
  2. 删除 node_modules
  3. 运行react-native upgradeandroid/app/build.gradle其他更新
  4. 在手机上卸载应用
  5. react-native run-android

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

React Native-__DEV__未定义

来自分类Dev

React Native-__DEV__未定义

来自分类Dev

React Native 错误 AppRegistry 未定义?

来自分类Dev

React Native 未定义函数

来自分类Dev

React Native - Ref 似乎未定义

来自分类Dev

在 React Native 中未定义

来自分类Dev

React Native 组件未定义

来自分类Dev

React Native - React Apollo - 数据道具未定义

来自分类Dev

react-native:`this.state`在`render`中未定义

来自分类Dev

react-native onChangeText this.value未定义

来自分类Dev

React Native TTS错误TextToSpeech未定义

来自分类Dev

错误未定义不是对象React Native

来自分类Dev

解析JSON以在React Native中建模未定义

来自分类Dev

ReferenceError:未定义Expo-React-Native

来自分类Dev

未定义的平面列表不是对象React-native

来自分类Dev

React Native HealthKit getDailyStepCountSamples返回未定义或空数组

来自分类Dev

TypeError:无法读取未定义的React Native的属性'map'

来自分类Dev

React-Native:如果对象未定义,则传递if语句

来自分类Dev

React-Native-无法读取未定义的属性“ cloneWithRowsAndSections”

来自分类Dev

未定义的 navigator.push React-native 0.43.4

来自分类Dev

使用 firebase 时未定义 react-native 函数

来自分类Dev

导入后在 react-native 中未定义

来自分类Dev

React Native + Fetch => TypeError:无法读取未定义的属性“then”

来自分类Dev

React Native:状态值被评估为未定义

来自分类Dev

从 React Native 导入 StyleSheet 时,未定义不是对象

来自分类Dev

使用 React Native 的未定义导航器

来自分类Dev

未定义(评估'this.props.navigation.navigate')React Native

来自分类Dev

React-Native Android 硬件 BackButton 单击“未定义不是函数(评估 '_this2.close()') 时出错”

来自分类Dev

未定义React

Related 相关文章

  1. 1

    React Native-__DEV__未定义

  2. 2

    React Native-__DEV__未定义

  3. 3

    React Native 错误 AppRegistry 未定义?

  4. 4

    React Native 未定义函数

  5. 5

    React Native - Ref 似乎未定义

  6. 6

    在 React Native 中未定义

  7. 7

    React Native 组件未定义

  8. 8

    React Native - React Apollo - 数据道具未定义

  9. 9

    react-native:`this.state`在`render`中未定义

  10. 10

    react-native onChangeText this.value未定义

  11. 11

    React Native TTS错误TextToSpeech未定义

  12. 12

    错误未定义不是对象React Native

  13. 13

    解析JSON以在React Native中建模未定义

  14. 14

    ReferenceError:未定义Expo-React-Native

  15. 15

    未定义的平面列表不是对象React-native

  16. 16

    React Native HealthKit getDailyStepCountSamples返回未定义或空数组

  17. 17

    TypeError:无法读取未定义的React Native的属性'map'

  18. 18

    React-Native:如果对象未定义,则传递if语句

  19. 19

    React-Native-无法读取未定义的属性“ cloneWithRowsAndSections”

  20. 20

    未定义的 navigator.push React-native 0.43.4

  21. 21

    使用 firebase 时未定义 react-native 函数

  22. 22

    导入后在 react-native 中未定义

  23. 23

    React Native + Fetch => TypeError:无法读取未定义的属性“then”

  24. 24

    React Native:状态值被评估为未定义

  25. 25

    从 React Native 导入 StyleSheet 时,未定义不是对象

  26. 26

    使用 React Native 的未定义导航器

  27. 27

    未定义(评估'this.props.navigation.navigate')React Native

  28. 28

    React-Native Android 硬件 BackButton 单击“未定义不是函数(评估 '_this2.close()') 时出错”

  29. 29

    未定义React

热门标签

归档