Aaron
Aaron

Reputation: 2755

Android Studio : Unable to delete original file

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

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

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>

Upvotes: 10

Views: 5221

Answers (5)

Nir Duan
Nir Duan

Reputation: 6392

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

Choose File | Invalidate Caches/Restart.

Upvotes: 14

Ujju
Ujju

Reputation: 2753

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

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

Upvotes: 1

Syed Farjad Zia Zaidi
Syed Farjad Zia Zaidi

Reputation: 3360

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

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

Upvotes: 1

yazantahhan
yazantahhan

Reputation: 3110

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

Upvotes: 3

Aaron
Aaron

Reputation: 2755

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

Upvotes: -1

Related Questions