[英]requireNativeComponent: "RNSScreenStackHeaderConfig" was not found in the UIManager
How to fix this error requireNativeComponent: "RNSScreenStackHeaderConfig" was not found in the UIManager.如何修复此错误 requireNativeComponent: 在 UIManager 中找不到“RNSScreenStackHeaderConfig”。 in windows pc i have tried @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(null);在 windows pc 我试过 @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(null); } but it didnt work and also tried.\gradlew clean both are not working in my case than how to fix it> } 但它没有工作,也试过了。\gradlew clean 在我的情况下两者都不起作用,而不是如何修复它>
{
"name": "letschat",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"@react-navigation/bottom-tabs": "^6.3.3",
"@react-navigation/native": "^6.0.12",
"@react-navigation/native-stack": "^6.8.0",
"react": "18.0.0",
"react-native": "0.69.5",
"react-native-safe-area-context": "^4.3.3",
"react-native-screens": "^3.17.0",
"socket.io-client": "^4.5.1"
},
"devDependencies": {
"@babel/core": "^7.12.9",
"@babel/runtime": "^7.12.5",
"@react-native-community/eslint-config": "^2.0.0",
"babel-jest": "^26.6.3",
"eslint": "^7.32.0",
"jest": "^26.6.3",
"metro-react-native-babel-preset": "^0.70.3",
"react-test-renderer": "18.0.0"
},
"jest": {
"preset": "react-native"
}
}
Kill Metro and clean gradle build (it might take a minute or two):杀死 Metro 并清理 gradle 构建(可能需要一两分钟):
cd android
.\gradlew clean
Start Metro and clear cache:启动 Metro 并清除缓存:
npm start --reset-cache
Recompile重新编译
npm run android
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.