Cache.properties(系统找不到指定的文件) [英] Cache.properties (The system cannot find the file specified)
问题描述
我刚刚开始使用 Android Studio 1.3 sdk 24,直到今天它都运行良好.我收到有关 cache.properties 的错误消息,然后我删除了该缓存文件,但现在收到此错误消息:
I just started using Android Studio 1.3 sdk 24 and it has worked fine until today. I get this error message about cache.properties and I delete that cache file but now I am getting this error message:
错误:C:\Users\user1.gradle\caches\2.4\scripts\asLocalRepo15_dhjxrnvsgiyg1ow3dfj4myl7\InitScript\initscript\cache.properties(系统找不到指定的文件)
Error:C:\Users\user1.gradle\caches\2.4\scripts\asLocalRepo15_dhjxrnvsgiyg1ow3dfj4myl7\InitScript\initscript\cache.properties (The system cannot find the file specified)
我尝试文件/使缓存无效/重新启动..并重建项目,但仍然收到此错误消息.我该如何解决?
I try file/invalidate caches/restart.. and rebuild project but am still getting this error message. How do I fix it?
推荐答案
您不必删除所有 .gradle
文件夹,也无需重新安装 Android Studio.
You don't have to delete all .gradle
folders and no need to reinstall Android Studio.
我有最新版本的 Android Studio,但我遇到了这个问题,唯一对我有用的是:
I have the latest version of Android Studio and I faced that problem, the only thing that worked for me is to:
导航到
C:\Users\user\.gradle\caches\2.x\
复制文件夹 scripts ,scripts-remapped 并将其粘贴到安全的地方,以防万一出现问题,您将其放回
Copy the folder scripts , scripts-remapped and paste it somewhere safe just in case anything went wrong you will place it back
从目录 C:\Users\user\.gradle\caches\2.x\ 中删除此文件夹 scripts 和 scripts-remapped
Delete this folder scripts and scripts-remapped from the directory C:\Users\user\.gradle\caches\2.x\
将项目与 Gradle 文件同步,您就完成了.
Sync Project with Gradle Files and you are done.
当您同步项目时,Android Studio 将生成新的缓存文件.
When you sync your project Android Studio will generate new cache files.
您还需要从 projectLocation/.gradle/buildOutputCleanup 中删除 buildOutputCleanup.lock,以防上述 4 个步骤不起作用.
You also need to delete buildOutputCleanup.lock from projectLocation/.gradle/buildOutputCleanup in case the above 4 steps do not work out.
它对我有用,我希望它对你有用.
It worked for me I hope it will work for you.
这篇关于Cache.properties(系统找不到指定的文件)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!