Android Studio Beta failed project refresh Access

2019-08-31 19:27发布

问题:

I'm trying to upgrade Android Studio to beta and it works fine until I close it and reopen it later (even after a restart).

After some time of using (or restarting Android Studio) I get the following error:

Gradle 'Project' project refresh failed

Error:C:\Program Files (x86)\Android\android-studio\plugins\gradle\gradle-1.12\bin\wrapper\dists\gradle-1.12-all\2apkk7d25miauqf1pdjp1bm0uo\gradle-1.12-all.zip.lck (Access is denied)

I've tried using Unlocker to check for a lock but there doesn't seem to be anything attached to it. I have uninstalled Android Studio and all components and reinstalled (Admin) but the problem reappeared. This problem never occurred on the preview.

回答1:

Turns out I had manually set GRADLE_USER_HOME & GRADLE_HOME in my variables

Must have been a long time ago but that's apparently what was causing the clash.