所以我将我的React Native版本降级到57.3版本,因为最新版本的bug太多了。起初,React Native 项目运行得很好,没有添加任何像 React Native Maps 这样的包,但是当我添加它并重新运行它时,它给了我一个错误。我的 React Native 项目的设置是正确的。
我尝试以管理员身份运行它,而不是以管理员身份运行。
“依赖项”:{
“ react ”:“16.6.0-alpha.8af6728”,
“ react native ”:“0.57.3”,
“react-native-maps”:“^0.23.0”
},
“开发依赖项”:{
"babel-jest": "24.5.0",
“笑话”:“24.5.0”,
“metro-react-native-babel-preset”:“0.53.1”,
“ react 测试渲染器”:“16.6.0-alpha.8af6728”
},
最佳答案
我认为堆大小可能存在问题。请尝试将 android:largeHeap="true"
添加到您的 Manifest.xml
并使用以下命令重建您的项目:
react-native run-android
你的manifest.xml将是这样的:
android:name=".MainApplication"
android:allowBackup="true"
android:largeHeap="true"
关于java - React Native Android 添加包时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55182724/