我看到了有关共享首选项的问题.问题:每当在使用SharedPreference时遇到强制关闭/应用程序崩溃时,SharedPreference将为null.在这里您可以了解更多有关它的信息:共享首选项强制关闭应用程序或崩溃时重置 I want to know which is better for storage purpose:Shared preferences or internal file storage.Which is faster?Is there any memory issue with anyone of them?Thanks, 解决方案 SharedPreference: Store private primitive data in key-value pairs. (To store small entries/data)Internal Storage: Store private data on the device memory. (To store large datasets)More about Storage Options here: Storage OptionsI have seen an issue about shared preference. Issue:Whenever you face Force close/app crash while using SharedPreference, SharedPreference will be null. Here you can read more about it: Shared Preferences reset when the app is force closed or crashes 这篇关于sharedpreference和内部文件存储之间的主要区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-23 02:26