如何清除本机缓存?

编程入门 行业动态 更新时间:2024-10-22 04:50:15
本文介绍了如何清除本机缓存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在本机开发中,构建应用程序时会使用多个缓存:

In react-native development, there are multiple caches used when the app is built:

  • 本机打包程序缓存
  • 仿真器缓存
  • Java端缓存(.gradle)文件夹(仅在android中)
  • npm缓存(如果有的话?)
  • 我也想念东西吗?因为我试图清除react-native中的缓存,以便能够重复仅在首次使用时发生的错误.但是清除上面的那些缓存并没有帮助.这是在android上.构建应用程序时,大多数行都不会像预期的那样显示最新信息,因为我清除了缓存.

    Am I missing something also? Because I'm trying to clear cache in react-native, to be able to repeat a bug that only occurs on first usage. But clearing those caches above did not help. This is on android. When the app is building, most of the rows DO NOT say UP-TO-DATE, as expected, because I cleared the cache.

    但是,仍有许多行用于打印此文本.喜欢:

    But, there are still many rows where this text is printed. Like:

    app:preBuild UP-TO-DATE

    app:preBuild UP-TO-DATE

    app:preDebugBuild截止日期

    app:preDebugBuild UP-TO-DATE

    :app:preReleaseBuild UP-TO-DATE

    :app:preReleaseBuild UP-TO-DATE

    问题是,如何清除与本机开发相关的整个缓存?

    The question is, how can I clear the whole cache related to react-native development?

    推荐答案

    对于React Native Init方法(无expo),请使用:

    For React Native Init approach (without expo) use:

    npm start -- --reset-cache

    更多推荐

    如何清除本机缓存?

    本文发布于:2023-11-26 03:01:03,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1632372.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:本机   缓存

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!