简体   繁体   中英

Android Studio 2.2 & 2.3 Gradle project refresh failed

I am new to Android Studio though I have watched a few tutorials before. I am getting the following error when I try to make a project on Android Studio 2.3:

Gradle "Projectname" project refresh failed.
Error:Failed to delete original file 'C:\Users\myname\AppData\Local\Temp\gradle_download2913498326076248476bin' after copy to 'C:\Users\myname\.gradle\caches\modules-2\files-2.1\javax.inject\javax.inject\1\6975da39a7040257bd51d21a231b76c915872d38\javax.inject-1.jar'.

Its the same error I got before updating from 2.2 to 2.3. I tried searching the internet but couldn't find a solution. Does anyone know how to fix this?

  1. If "Messages Gradle Sync" recommends an upgrade; you probably already did this.
  2. Disable instant run, To do this: 2.a. Open the Settings or Preferences dialog: On Windows or Linux, select File > Settings from the menu bar. On Mac OSX, select Android Studio > Preferences from the menu bar. 2.b. Navigate to Build, Execution, Deployment > Instant Run. Uncheck the box next to Restart activity on code changes.
  3. Check your anti-virus and turn-off, try again. I have not had this issue, but it was recommended on some older posts with success.

Hope one of these takes care of it. :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM