2015-09-23 94 views
2

由於無法訪問cache.properties文件,因此我在android Studio中的gradle構建失敗。我試圖使所有的緩存無效並重試,但沒有奏效。我還重新安裝了所有的SDK工具。下面是我得到由於無法找到cache.properties,因此無法執行Gradle構建

Error:java.io.FileNotFoundException: C:\Users\Siddharth\AndroidStudioProjects\IntentAssignment.gradle\2.4\taskArtifacts\cache.properties (The system cannot find the file specified) C:\Users\Siddharth\AndroidStudioProjects\IntentAssignment.gradle\2.4\taskArtifacts\cache.properties (The system cannot find the file specified) Blockquote

做什麼任何意見的錯誤,下面是完整的控制檯輸出:

FAILURE: Build failed with an exception. * What went wrong: java.io.FileNotFoundException: C:\Users\Siddharth\AndroidStudioProjects\IntentAssignment.gradle\2.4\taskArtifacts\cache.properties (The system cannot find the file specified) C:\Users\Siddharth\AndroidStudioProjects\IntentAssignment.gradle\2.4\taskArtifacts\cache.properties (The system cannot find the file specified) * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 0.747 secs

回答

0

運行CMD 寫%temp% 那麼臨時文件夾中打開刪除所有文件temp然後重建你的項目 希望這會解決你的問題

3

刪除gradle文件夾,退出Android Studio並重新啓動爲我解決這個問題

相關問題