Unable to clean project in Android Studio

后端 未结 22 1304
醉梦人生
醉梦人生 2020-12-17 07:49

OS version: Ubuntu 14.04 LTE 64 Bit

Java JRE/JDK version: Oracle JDK 1.8.0_11

Project directory is on a NTFS based drive.

Whenever I try to clean my

相关标签:
22条回答
  • 2020-12-17 08:14

    You can go into the project directory and call gradle from the command-line to do a clean on the project:

    gradlew clean
    

    When you reopen the project you will need to run a gradle sync again.

    0 讨论(0)
  • 2020-12-17 08:14

    I'm not on Windows, but OS X. Somehow my build folder didn't have the proper permission for AS to delete the file so I did chmod -R 777 <your_directory> in the affected parent directory.. probably 777 isn't what you would want but it worked for me.

    0 讨论(0)
  • 2020-12-17 08:18

    I had the same issue as you. I tried some of the solutions proposed on this page and it didn't work. So I used Process Explorer to find which process is locking the apk file and it was firefox. I think it keeps the file locked when I upload the apk in google play console. To make that go to "Find > Find Handle or DLL... > path-to-your-app.apk". Hope it help

    0 讨论(0)
  • 2020-12-17 08:18

    Running android studio as administrator in windows worked for me. :)

    0 讨论(0)
  • 2020-12-17 08:21

    Go to

    File > Settings > Build, Execution, Deployment > Instant Run > Uncheck this Check box (Enable Instant Run to hot swap code)

    Thanks Have a nice coding

    0 讨论(0)
  • 2020-12-17 08:21

    I came to this thread because I was having issues with my /release/app.aab getting locked. This prevented me from completing a project clean and generating a signed bundle. My work around was to restart my computer to get permissions back until I solved the issue.

    It turns out that Git was locking the app.aab, and all I had to do was add "/release" to my /app/.gitignore.

    Hope this helps someone.

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