例如 线上的包时gradle1.3.0版本编译的,现在新版本使用gradle1.5.0版本编译,那么用户覆盖升级app时,cache目录就会消失。
阿神2017-04-17 17:41:43
The cache folder you are talking about is the data/data/your_package/cache directory folder? If so, this cache directory will not disappear automatically. There are two situations when it disappears. One is that the user actively uses the clear cache function (including the manual clear cache function written by programmers). The other is that the system detects that the memory is not enough and will enable it. The underlying cache function cleans the cache of recently inactive applications. However, in both cases, only the contents of the cache file directory are operated, and the entire cache directory folder is not cleared. It has nothing to do with which version of gradle your application is compiled with.