Android Studio:無法刪除原始文件

[英]Android Studio : Unable to delete original file


I'm very new to android and I just recently cloned an Android project.

我是android的新手,最近我克隆了一個android項目。

When Android Studios performs the indexing once opening the project, i get this error all the time.

當Android studio在打開項目時執行索引時,我總是會得到這個錯誤。

this is the error I get from Android Studio.

這是我從安卓工作室得到的錯誤。

Error:(89, 0) Failed to delete original file 'C:\Users\myname\AppData\Local\Temp\gradle_download8065263342645015068bin' 
after copy to 'C:\Users\myname\.gradle\caches\modules-2\files-2.1\com.android.tools.build\gradle\1.5.0\1c3d2b23212349ffbe6479fcb04732c5cddaf98b\gradle-1.5.0.pom'
<a href="openFile:D:\myname\mobile-myapp-tester\platforms\android\build.gradle">Open File</a>

5 个解决方案

#1


12  

Try the next step to "Refresh" your IDE (android sutdio)

嘗試下一個步驟來“刷新”你的IDE (android sutdio)

Choose File | Invalidate Caches/Restart.

選擇文件|無效緩存/重新啟動。

#2


2  

Another possible cause is the Anti-virus. It may block Gradle or Java

另一個可能的原因是反病毒。它可以阻止等級或Java

#3


1  

There can be multiple reasons for this error but are usually linked to Rights. I solved this by following these 2 different steps at different times.

這一錯誤可能有多種原因,但通常與權利相關。我用這兩個不同的步驟在不同的時間解決了這個問題。

  • Run Android Studio as Administrator

    以管理員的身份運行Android Studio

  • Check if the your project folder is read-only ? If yes, remove the read-only attribute from Folder Properties.

    檢查您的項目文件夾是否為只讀?如果是,從文件夾屬性中刪除只讀屬性。

#4


1  

If Invalidate Caches/Restart doesn't work, change your GRADLE BUILD TOOL to any lower Version, or different Version untill it works

如果無效緩存/重新啟動不起作用,請將GRADLE構建工具更改為任何較低的版本,或者更改不同的版本,直到它正常工作

For me I got the error for Gragle 2.2.3, but fixed when I changed to 2.1.3, you can try with different newer versions from here Gradle Build Tools

對於我來說,我得到了Gragle 2.2.3的錯誤,但是當我更改為2.1.3時,修正了錯誤,您可以嘗試從這里開始的不同更新版本的構建工具

#5


0  

I was able to solve my issue by disabling the Instant Run feature of android studio.

我可以通過禁用android studio的即時運行特性來解決我的問題。


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2016/07/19/724fffd099946ab051d21c51159c52b2.html



 
粤ICP备14056181号  © 2014-2020 ITdaan.com