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