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

后端 未结 11 1356
伪装坚强ぢ
伪装坚强ぢ 2020-12-16 10:12

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 sampl

相关标签:
11条回答
  • 2020-12-16 10:42

    Invalidating the IDE cache is NOT enough.

    1. Delete the folder app\build
    2. Invalidate Caches / Restart...

    Context: Using Coroutines in Android Instrumented Test.

    GL

    0 讨论(0)
  • 2020-12-16 10:45

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

    0 讨论(0)
  • 2020-12-16 10:50

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

    0 讨论(0)
  • 2020-12-16 10:53

    Do This

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

    0 讨论(0)
  • 2020-12-16 10:53

    I had 2 jre's installed when I installed android studio. Uninstall the one that you find from control panel and that is located something like c:\program files\java etc.

    On the next opening of android studio 4.0 + it will fallback to "C:\Program Files\Android\Android Studio\jre" and the process lockdown after each succesfull build will stop

    0 讨论(0)
提交回复
热议问题