问题
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