Android更新导致错误:错误:java.nio.file.AccessDeniedException:/home/path/.android/build-cache.lock [英] Android update causing error: Error:java.nio.file.AccessDeniedException: /home/path/.android/build-cache.lock
问题描述
将Android Studio从版本2.3更新到了Canary 3.1.但是Gradle
似乎有个很大的问题.
Updated Android Studio from version 2.3 to 3.1 Canary. But there seems to be a huge problem with Gradle
.
错误:java.nio.file.AccessDeniedException: /home/pathname/.android/build-cache.lock
Error:java.nio.file.AccessDeniedException: /home/pathname/.android/build-cache.lock
我做了什么:
- 删除了
.gradle
,以为它可以解决问题,但是在重建项目后,没有出现.gradle
. - 从系统(SDK,Android Studio和其余项目)中删除所有与android相关的内容,并从零开始下载具有所有必需软件包的Android Studio.仍然,同样的问题.
- 将android studio版本从3.1 canary更改为3.0,也没有成功.
- 查看了此帖子,但没有帮助.
- 请阅读一些文章,指出Android Studio损坏时会发生这种情况.但是我已经从官方网站下载了.
- Deleted
.gradle
, thought it will solve the issue, but not, after rebuilding the project,.gradle
again appears. - Deleted all android related things from system (SDK, Android Studio and remaining projects) and from zero started to download Android Studio with all required packages. Still, the same problem.
- Changed android studio version from 3.1 canary to 3.0, also no success.
- Looked at this post, but didnt help.
- Read in some posts that this happens when Android Studio is corrupted. but I have downloaded from official site.
任何想法如何解决?
推荐答案
已解决,在Linux中,我将该目录的所有权和模式更改为以下内容:
sudo chown MyUserName:MyUserName
//这允许从管理员访问更改为用户访问. 注意它应该从 在那里,您的android studio所在的位置.可能在/Home
或/Download
文件夹
sudo chown MyUserName:MyUserName
// This allows to change from administrator access to user access. Note it should be executed from there, where your android studio is located. Either it might be in/Home
or/Download
folder
sudo chmod -664
//这允许文件是可读写的.
sudo chmod -664
//This allowed files to be readable and writeable.
重新安装或其他多余的东西似乎无济于事,除非您确实处理了正确的root规范和文件模式.
这篇关于Android更新导致错误:错误:java.nio.file.AccessDeniedException:/home/path/.android/build-cache.lock的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!