React-Native / Expo:尝试在空对象上调用虚拟方法

发布于 2025-01-21 16:46:29 字数 1298 浏览 1 评论 0原文

我是新手反应本地的。我能够成功地将我的应用程序连接到Expo,但它不断显示“尝试调用虚拟方法'boolean abi44_0_0.host.expenent.modules.modules.api.reanimated.reanimated.layoutreanimation.reeletreanimation.RealayOutAnimation.islayOutAnimation.islayOutAnimimationAnimatiAnimabledEnabledEnabledEnabledEnabledNabbled()”)在null对象引用上”。即使在分别重新加载之后,它也不会显示其他任何内容。 这是我设备上显示的方式

这是在我的Android设备上显示的方式

在此处输入图像描述

尽管我能够在计算机上的Web浏览器上打开该应用程序。我不知道会出了什么问题。

这是我的代码。

import { StatusBar } from 'expo-status-bar'
import { StyleSheet, Text, View } from 'react-native'
//App.js File
export default function App() {
  return (
    <View style={styles.container}>
      <Text>Open up App.js to start working on your app!</Text>
      <StatusBar style='auto' />
    </View>
  )
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
})

I am new to react native. I was able to connect my app to Expo go on my android device successfully, but it keeps showing "Attempt to invoke virtual method 'boolean abi44_0_0.host.exp.expenent.modules.api.reanimated.layoutReanimation.ReaLayoutAnimation.isLayoutAnimationEnabled()' on a null object reference". It does not show anything else, even after reloading severally. Here is how it is displayed on my device

Here is how it is displayed on my android device

enter image description here

Although I was able to open the app on a web browser on my computer. I don't know what could have gone wrong.

here is my code.

import { StatusBar } from 'expo-status-bar'
import { StyleSheet, Text, View } from 'react-native'
//App.js File
export default function App() {
  return (
    <View style={styles.container}>
      <Text>Open up App.js to start working on your app!</Text>
      <StatusBar style='auto' />
    </View>
  )
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
})

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文