Android Studio I keep getting Gradle error “The process cannot access the file because it is being used by another process”

老子叫甜甜 提交于 2020-04-09 05:21:36

问题


I can import a sample app project, try to build it and I keep getting this error. Not always the same file but a new temp file each time. I've tried several different samples. I've been programming for 30+ years and feel completely clueless. Only clue seems to be the Windows Task Manager shows 99% to 100% CPU usage when it gives the error and ends the build.


回答1:


Do This

File -> Invalidate Caches / Restart.. -> Invalidate/ Restart




回答2:


Just clean the project and have a run ! It would work ....




回答3:


When this happens to me on Windows 8, I open the task manager

and simply kill all the instances of "openjdk platform binary"




回答4:


I have the same issue's.Even I tried all the solution mentioned here it didn't work.Even I can't delete the signin file as running android studio administrative mode.I see a notification at bottom right side of the IDE update gradle pluggin.So update gradle pluggin usually worked for me




回答5:


The all files in "app/build" directory in project folder. This will fix the error.



来源:https://stackoverflow.com/questions/41538246/android-studio-i-keep-getting-gradle-error-the-process-cannot-access-the-file-b

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!