这解决了我的问题:
将以下内容添加到您的“android/app/src/main/AndroidManifest.xml”文件中
<application android:largeHeap="true"
<application android:largeHeap="true">
对于Android:在清单文件中的Android标签
application android:largeHeap="true"
android:hardwareAccelerated="true"
对于iOS:在Build Phases下打包React Native代码和图像部分
export NODE_BINARY=node
export NODE_ARGS=--max-old-space-size=8192
export NODE_OPTIONS=--max-old-space-size=8192
../node_modules/react-native/scripts/react-native-xcode.sh
如果您的应用程序从网络加载图像,则使用以下库
https://github.com/fungilation/react-native-cached-image