![小程序数据缓存常见问题](https://i-blog.csdnimg.cn/blog_migrate/2f39d3fcae0490729551b8ed2b04a113.png)
小程序数据缓存常见问题
![](https://i-blog.csdnimg.cn/blog_migrate/72b29f5f8dc887aea3734a51145bcaf0.png)
You open an app, it immediately force closes. You open it again, it does the same thing. There’s clearly a problem here—but simply clearing your app data and cache might prove to be a pretty easy fix.
您打开一个应用程序,它将立即关闭。 再次打开它,它做同样的事情。 显然这里有一个问题-但仅清除应用程序数据和缓存可能证明很容易解决。
Just like any other operating system, Android stores certain app data that saves your preferences, logins, and the like. That’s why you can just fire up Facebook or Instagram and not have to log in every time. But sometimes, this data can become corrupt and cause problems.
就像任何其他操作系统一样,Android会存储某些应用程序数据,以保存您的首选项,登录名等。 因此,您可以启动Facebook或Instagram,而不必每次都登录。 但是有时,这些数据可能会损坏并引起问题。
There are two basic types of files that can be cleared from within apps: cache and data. Cache files are just temporarily stored files that the app has downloaded. For example, when you stream music, the app may pre-download the songs as it plays to avoid any disruption. These files are then saved as cache files. After clearing the cache, the app will simply need to re-download any files that it had saved for temporary use. Otherwise, there’s no big downside.
可以从应用程序中清除的文件有两种基本类型:缓存和数据。 缓存文件只是应用程序已下载的临时存储文件。 例如,当您串流音乐时,该应用程序可能会在播放音乐时预先下载歌曲,以免造成任何干扰。 然后将这些文件另存为缓存文件。 清除缓存后,该应用仅需要重新下载已保存供临时使用的任何文件。 否则,没有太大的不利影响。
Data, on the other hand, is crucial information stored by the application. This contains login information, app preferences, and the like. When you clear app data, it’s similar to uninstalling and re-installing the application. It clears out everything the apps has stored, basically forcing it to a fresh state. This is sort of the “worst case” solution—if clearing the cache doesn’t help, then clearing the data should.
另一方面,数据是应用程序存储的关键信息。 这包含登录信息,应用程序首选项等。 当您清除应用程序数据时,它类似于卸载并重新安装该应用程序。 它清除了应用程序已存储的所有内容,基本上将其强制为新状态。 这是“最坏情况”的解决方案,如果清除缓存无济于事,则应该清除数据。
如何清除应用程序缓存和数据 (How to Clear App Cache and Data)
If you’re having an issue with an app, you should start by clearing its cache. This may not be cause of your problem, but it’s an easy and harmless first step to try.
如果您遇到某个应用问题,则应先清除其缓存。 这可能不是造成您问题的原因,但这是尝试的简单且无害的第一步。
To do this, first open the Settings menu, and then navigation to the “Apps & Notifications” section.
为此,请先打开“设置”菜单,然后导航到“应用和通知”部分。
![](https://i-blog.csdnimg.cn/blog_migrate/726384a763cb301eaae15c0197c2a2b0.png)
![](https://i-blog.csdnimg.cn/blog_migrate/86c8572150357f98e55304b11b71c295.png)
If you’re phone is running Android Oreo or newer, you’ll need to tap the “See All Apps” button to view the full list. Otherwise, just find the app that’s giving you issues on the list.
如果您的手机运行的是Android Oreo或更高版本,则需要点击“查看所有应用”按钮以查看完整列表。 否则,只需在列表中找到给您带来问题的应用即可。
![](https://i-blog.csdnimg.cn/blog_migrate/be479beadd3328710e39ee5e9eb780aa.png)
![](https://i-blog.csdnimg.cn/blog_migrate/52d4dd7db12bf25970990b32b1e01341.png)
Once you’ve found the app, the first thing you’ll need to do is kill all running instances of it. Tap the “Force Stop” button, and then confirm that action in the popup.
找到该应用程序后,您需要做的第一件事就是杀死该应用程序的所有正在运行的实例。 点击“强制停止”按钮,然后在弹出窗口中确认该操作。
![](https://i-blog.csdnimg.cn/blog_migrate/af463c8abb5e13c63ead1836b783bfcc.png)
![](https://i-blog.csdnimg.cn/blog_migrate/db88868beb0c297ef5948163d4bd43c4.png)
When the app is closed, tap the “Storage” entry.
关闭应用程序后,点击“存储”条目。
![](https://i-blog.csdnimg.cn/blog_migrate/90db4f17245696f9242389cc96a2323c.png)
On the Storage menu, tap the “Clear Cache” button.
在存储菜单上,点击“清除缓存”按钮。
![](https://i-blog.csdnimg.cn/blog_migrate/f2f653ea5ded028c86653f0814346e61.png)
Try running the app again. If the problem persists, you can repeat the above steps, but tap the “Clear Storage” (or “Clear Data”) button instead. Just be aware that you’ll lose your data associated with that app.
尝试再次运行该应用程序。 如果问题仍然存在,则可以重复上述步骤,但是请点击“清除存储”(或“清除数据”)按钮。 请注意,您将丢失与该应用程序关联的数据。
![](https://i-blog.csdnimg.cn/blog_migrate/a6256ad05fc5160ecf79c53b7f6e2e81.png)
The next time you launch the app, you’ll need to set it up as if it were just installed, but this will hopefully fix any problems you were having with it.
下次启动该应用程序时,需要像安装它一样对其进行设置,但这有望解决您遇到的所有问题。
If neither of these steps fix the problem, then the problem may not be on your end. It might be a faulty update pushed by the app developer, and at that point, the best thing you can do is submit a bug report to the developer and hope it gets fixed.
如果这些步骤都不能解决问题,那么问题可能就不在您自己了。 这可能是应用程序开发人员推送的错误更新,此时,您最好的办法是向开发人员提交错误报告,并希望它得到解决。
小程序数据缓存常见问题