search

Home  >  Q&A  >  body text

java - Gradle升级后编译的正式包,在覆盖旧的线上包时,data目录下cache文件夹缓存消失?

例如 线上的包时gradle1.3.0版本编译的,现在新版本使用gradle1.5.0版本编译,那么用户覆盖升级app时,cache目录就会消失。

PHP中文网PHP中文网2828 days ago402

reply all(1)I'll reply

  • 阿神

    阿神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.

    reply
    0
  • Cancelreply