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

查看:944
本文介绍了Android更新导致错误:错误: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

我做了什么:

  1. 删除了.gradle,以为它可以解决问题,但是在重建项目后,没有出现.gradle.
  2. 从系统(SDK,Android Studio和其余项目)中删除所有与android相关的内容,并从零开始下载具有所有必需软件包的Android Studio.仍然,同样的问题.
  3. 将android studio版本从3.1 canary更改为3.0,也没有成功.
  4. 查看了此帖子,但没有帮助.
  5. 请阅读一些文章,指出Android Studio损坏时会发生这种情况.但是我已经从官方网站下载了.
  1. Deleted .gradle, thought it will solve the issue, but not, after rebuilding the project, .gradle again appears.
  2. 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.
  3. Changed android studio version from 3.1 canary to 3.0, also no success.
  4. Looked at this post, but didnt help.
  5. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆