首页 > 解决方案 > 在 Expo 零食模拟器中,我无法解决错误:无法重新定义属性:ThemeProvider

问题描述

我已经通过从 Github 拉取我的代码到 Exponack 模拟器中。

加载我的代码后,我在运行模拟器时收到以下错误:

无法重新定义属性:ThemeProvider Evaluating react-navigation.js Evaluating App.js Loading App.js

为什么 react-navigation.js 似乎与这个模拟器不兼容?

这是我收到的错误消息

这是我用于我的应用程序的依赖项。我不确定这是否是依赖项之间的兼容性问题。如果这不是我的依赖项的问题,它可能是我需要卸载的一个不适用于模拟器的包吗?

{
   "dependencies": {
        "axios": "^0.21.1",
        "moment": "^2.29.1",
        "firebase": "8.2.3",
        "form-data": "^4.0.0",
        "fb-watchman": "^2.0.1",
        "react-redux": "^7.2.4",
        "redux-thunk": "^2.3.0",
        "expo-updates": "~0.5.4",
        "expo-calendar": "~9.1.2",
        "expo-status-bar": "~1.0.4",
        "expo-file-system": "~11.0.2",
        "react-native-svg": "12.1.0",
        "react-navigation": "^4.4.4",
        
        "react-navigation-stack": "^2.10.4",
        "@react-navigation/stack": "^5.14.3",
       
        "react-native-safe-area-context": "3.2.0",
        "@react-native-community/masked-view": "0.1.10",
        "
        "react-is": "^16.8.0",
        "expo-asset": "~8.3.1",
        "expo-constants": "~10.1.3",
        "prop-types": "*",
        "redux": "*",
        "react-native-vector-icons/Feather": "*",
        "firebase/firestore": "8.2.3"
    }
}

标签: react-nativereact-reduxexporeact-navigation

解决方案


推荐阅读