Can't update Android Studio - Access Denied and java.io.FileNotFoundException

前端 未结 11 1925
青春惊慌失措
青春惊慌失措 2021-02-18 15:00

I\'m trying to update Android Studio from 0.5.1 to 0.5.2 on two separate Windows machines, one with Windows 7 Pro 64-bit and one with Windows 7 Enterprise 64-bit.

I get

11条回答
  •  礼貌的吻别
    2021-02-18 15:17

    Don't re-install as an Administrator!

    Whilst running in Admin mode might make the update work, it may also affect the permissions that are set on any files that are added and/or updated, such that future operations in Android studio that use such files will need elevated (Admin) access to work properly.

    Doing this will result in many operations not working unless Android Studio has been run in elevated mode.

    Instead, deal with the file lock, then try again:

    Try killing all instances of java.exe (in Task Manager or Process Explorer), then re-attempt the update, but not running as Administrator.

    Every time I've used Process Explorer (on Windows) to check which application has a lock on one of the files that's blocked an Android Studio update, it's always been Java.

    What worked for me (on Windows):

    1. Download Process Explorer, and kill all instances of java.exe: in Process Explorer, sort by the Process column and find java.exe instances, press Del on the highlighted row. (On a side note, the file that's blocking the update, for example jsch.agentproxy.usocket-nc.jar, can be checked by pressing Ctl+F, and then entering the file name)
    2. If the update process doesn't automatically resume, kill it by dragging the target icon enter image description here to the update process' window - this locates it in Process Explorer's Process window - and then press Del to delete the process
    3. Re-run Android Studio (from start menu), and re-initiate update process.

提交回复
热议问题