简体   繁体   English

在Android中安装时如何在外部存储上保存大文件?

[英]How to save a large file on external storage at Installation in Android?

I am creating an Android App that uses the MapsForge library to show a map. 我正在创建一个使用MapsForge库来显示地图的Android应用程序。 The Map view in MapsForge shows data from a large file. MapsForge中的Map视图显示来自大文件的数据。 Once this file is present, it will only be read, and never edited. 一旦该文件存在,它将只被读取,并且从不编辑。

While developing, I am manually copying the file to the external storage. 在开发时,我手动将文件复制到外部存储。

How do I make the apk contain this file, and make sure that at the installation of the APP, this file will be written to the external storage? 如何让apk包含此文件,并确保在安装APP时,此文件是否会写入外部存储?

If the APK contains the file, and you write it to external storage, it will be both in the APK and on the external storage. 如果APK包含该文件,并且您将其写入外部存储,则它将同时位于APK和外部存储中。 You do not want that. 你不希望出现这种情况。

You want to either: 你想要:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 Android 中正确地将文件保存到外部存储? - How to save file to external storage properly in Android? 如何在Android外部存储中保存公共文件 - how to Save Public File in Android external storage 如何将文件保存到 Android Q (API 29) 上的公共(外部)存储? - How to save file to public (external) storage on Android Q (API 29)? 如何将文件保存在 Android 13 上的外部存储中,该文件也向后兼容? - How to save a file in the external storage on Android 13 that is also backward compatible? 如何在android中的内部/外部存储中保存已解析的文本文件 - How to save parsed text file in internal/external storage in android 如何将生成的xml文件保存到Android外部存储 - How do I save a generated xml file to Android external storage 无法将文件保存到 android 中的外部存储目录 - Unable to save file to an external storage directory in android android API LEVEL28 使用 Android SAF(存储访问框架)后如何将文档文件保存在外部存储中 - How to save Document file in external storage after android API LEVEL28 With Android SAF(Storage Access Framework)) Android将图像保存到外部存储 - Android save image to external storage Android将图像保存在外部存储中 - Android save image in external storage
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM