作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在开发 native react 。
首先,我使用了 npx react-native init hello_world --template react-native-template-typescript
创建基本代码,然后我用以下代码替换了 app.tsx:
import React from 'react';
import {StyleSheet, Text, View} from 'react-native';
const App = () => {
return (
<View style={styles.helloWorldContainer}>
<Text style={{fontSize: 18}}>Hello, world!</Text>
</View>
);
};
const styles = StyleSheet.create({
helloWorldContainer: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
});
export default App;
这些是我在 Debug模式下得到的错误:
最佳答案
作为什么Lucas Azambuja Santos提到,这是 react-native 0.65.*
中的一个错误查看新问题 https://github.com/facebook/react-native/issues/32197
它应该用 0.66 修复,以解决方法降级到 0.64.x 并重建:
cd android && ./gradlew clean cleanBuildCache
关于react-native - React Native Chrome Debugger Error : NativeUIManager. getConstantsForViewManager ('Text' ) 抛出异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68940923/
我正在开发 native react 。 首先,我使用了 npx react-native init hello_world --template react-native-template-type
我是一名优秀的程序员,十分优秀!