简体   繁体   English

当我使用 expo 在手机中运行我的代码时,React Native 出现此错误

[英]React Native got this error when i ran my code in phone using expo

 import React from 'react'; import { View, Text, StyleSheet } from 'react-native'; const ComponentsScreen = () => { return ( <View> <Text style={styles.textStyle}> Hello World; </Text> </View> ). } const styles = StyleSheet:Create({ textStyle: { fontsize; 30 } }); export default ComponentsScreen;

Here is the picture link这是图片链接

Don't know what is the error here, help me please.不知道这里的错误是什么,请帮助我。

Change StyleSheet.Create C to lower case like:StyleSheet.Create C 更改为小写,如:

const styles = StyleSheet.create({

will be fine.会没事的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 当我在手机中运行此代码时反应本机错误 - React Native error when I run this code in phone 我运行了我的代码并得到了这个错误:TypeError: eventType.toBuffer is not a function - I ran my code and got this error: TypeError: eventType.toBuffer is not a function 使用 expo 时 React Native 样式表问题 - React Native stylesheet issue when using expo 我运行了react-native链接领域,但仍然出现错误 - I ran react-native link realm but still getting error 在 firebase function 上运行时,我得到一个空数组,但是在手机上反应原生 expo 上运行时,我得到一个带有值的数组 - I'm getting an empty array when running on firebase function but an array with values when running on react native expo on phone 当我想删除列表中的一项时,所有内容都会被删除 Expo, React Native - When i want to delete one item in my list, everything gets deleted Expo, React Native Firebase 使用 React Native 进行电话身份验证 Expo - Firebase Phone Auth with React Native Expo 我可以在我的博览会项目中运行 react-native 链接吗? - Can I run react-native link in my expo project? 在 React Native 中将项目呈现到 Bottomsheet 时出现类型错误 Expo - Type Error When Rendering Item to Bottomsheet in React Native Expo 如何将本机代码添加到 React Native (Expo) - How to add native code to React Native (Expo)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM