【发布时间】:2022-09-29 03:08:07
【问题描述】:
我正在开发一个 Expo React Native 项目,该项目在 android 中需要高达 15MB 的本地存储空间。这需要将以下内容添加到 android/gradle.properties 文件中。
AsyncStorage_db_size_in_MB=10
我试过用
import { withGradleProperties } from \"@expo/config-plugins\"; export const modifyGradle = (config) => { const AsyncKey = \"AsyncStorage_db_size_in_MB\"; return withGradleProperties(config, (config) => { config.modResults.push({ type: \"property\", key: AsyncKey, value: 10, }); return config; }); };然后添加到 app.json 作为
expo:{ ... \"plugins\": [\"./plugins/modifyGradle.js\"], ... }我在这里做错了什么?在不退出世博会的情况下如何做到这一点?
标签: android react-native expo asyncstorage