Error:Could not open initscript class cache for initialization script 'C:\Users\Avishek\AppData\Local\Temp\asLocalRepo14.gradle' (C:\Users\Avishek.gradle\caches\2.2.1\scripts\asLocalRepo14_dkwbdtenxxg


Error:Could not open initscript class cache for initialization script 

见鬼 Android Studio打开项目时遇到这个问题 昨天还是好好的 但是作为一个开发者得淡定. 

何况还有Stack overflow这个神奇的网站。

http://stackoverflow.com/questions/30749042/error-in-building-project-in-android-studio

http://stackoverflow.com/questions/32285065/could-not-open-initscript-class-cache-for-initialization-script

 

很快查到了 解决方式 最靠谱的 有两种 一种是删除C:\Users\Avishek.gradle\caches\2.2.1\scripts\asLocalRepo14_dkwbdtenxxg\下的缓存的几个文件夹 

重启Android Studio 重新下载gradle加载编译 

另外一种是 File > Invalidate Caches/Restart  第一种我没有试过 我用的是第二种 File > Restart

重启 重新下载编译即可。

 

补充:

 但是这样的话 如果在编译途中突然卡死 退出的话 重新进来 还是会有这个问题 所以最好的方法感觉还是离线Gradle. 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



猜您在找 " on line 75 -- aborting creation process"> !include: could not find: "C:\Users\走我们~1\AppData\Local\Temp\t-wc8ODN\0-messages.nsh" Error in script "" on line 75 -- aborting creation process Permission denied: 'C:\\Users\\Admin\\AppData\\Local\\Temp\\tmp06sdogpt.py' Command "python setup.py egg_info" failed with error code 1 in c:\users\w5659\appdata\local\temp\pip-build-fs2yzl\ipython\ 出现错误OSError: Failed to open file b'C:\\Users\\\xe5\xbb\x96\xe5\xbb\xba\xe8\xb6\x85\\AppData\\Local\\Temp\\scipy-mvo2l638' 安装gensim报错:Original error was: DLL load failed: 找不到指定的模块。 Command "python setup.py egg_info" failed with error code 1 in C:\Users\xubing\AppData\Local\Temp\pip-install-nta89iep\gensim\ Go:go程序报错Cannot run program "C:\Users\dell\AppData\Local\Temp\___go_build_hello_go.exe" (in directory "…………"):该版本的 %1 与你运行的 Windows 版本不兼容。 pip安装lxml报错 Fatal error in launcher: Unable to create process using '"c:\users\administrator\appdata\local\programs\python\python36\python.exe" "C:\Users\Administrator\AppData\L npm报错npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2018-03-15T01_48_14_769Z-debug.log scalac: Token not found: C:\Users\xjr76\AppData\Local\JetBrains\IdeaIC2021.1\compile-server\tokens\3200 PermissionError: [Errno 13] Permission denied: 'C:\\Users\\Administrator\\AppData\\Local\\pyinstaller\\bincache00_py37_64bit\\ucrtbase.dll'
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM