kklmarvelmedia
kklmarvelmedia

Reputation: 61

Android Studio build cannot delete path

I always have this in my Android Studio Windows 10. Every time I build my project and it just throw this.

Execution failed for task ':kruso:transformClassesWithDesugarForDevDebug'.
> com.android.build.api.transform.TransformException: java.io.IOException: Could not delete path 'C:\Users\Admin\Desktop\source_code\android\googleplayapps\Kruso\kruso\build\intermediates\transforms\desugar\dev\debug\0.jar'.

I tried several solutions i can find in stackoverflow but none works as expected. Here are the things I tried:

  1. Deleting the build folder (Not working, Windows complain the folder or file is being used by another process)
  2. Clean and rebuild project (Sometimes works, sometimes will still complain could not delete path. This is not applicable since it would take long time, ~4mins, to rebuild. If using Instant Run, it would just take 45s)
  3. Restart Android Studio (This works, but restarting Android Studio for every build is just taking too much of time.)

p/s I'm using a Windows 10 powered by Intel i5-7200U, 12GB RAM, Android Studio 3.1.2

Upvotes: 1

Views: 4152

Answers (1)

Om Infowave Developers
Om Infowave Developers

Reputation: 1565

Simple Close the Android studio goto project Location and delete the folder from File explore, without starting an android studio.

If needed restart system and without starting any other program, goto project location and delete the folder.

Upvotes: 2

Related Questions