简体   繁体   English

Android Studio ---- 路径不可写。 请选择一个新的位置

[英]Android Studio ---- The path is not writable. Please choose a new location

I just installed Android Studio and want to start a new project.我刚刚安装了 Android Studio,想开始一个新项目。 But it showed the following error message:但它显示了以下错误消息:

The path XYZ is not writable.路径 XYZ 不可写。 Please choose a new location请选择一个新的位置

How should I fix this problem?我应该如何解决这个问题?

The most likely explanation is that the directory and all its files are owned by a different user account on the system.最可能的解释是该目录及其所有文件由系统上的不同用户帐户拥有。 Normally the "Clear Read-Only Access" dialog will fix up read permission problems if it's possible to do so;通常情况下,“清除只读访问”对话框会在可能的情况下修复读取权限问题; if it's not (because the files are owned by another user), the dialog will refuse to let you click the OK button.如果不是(因为文件归另一个用户所有),对话框将拒绝让您单击“确定”按钮。

You can confirm this by using the ls command from the MacOS terminal.您可以从 MacOS 终端使用 ls 命令来确认这一点。 Here's an example from a random project of mine.这是我的一个随机项目中的一个例子。

I had the same issue.我遇到过同样的问题。 Running Android Studio as an administrator worked for me.以管理员身份运行 Android Studio 对我有用。 If this is a possibility for you and you did not do it before, give it a whirl.如果这对您来说是一种可能性,而您以前没有这样做过,请试一试。

Myself also faced the same problem because , I have changed the permission of that drive from x:\\ -> properties -> security .我自己也遇到了同样的问题,因为我已经从 x:\\ -> properties -> security 更改了该驱动器的权限。 Once I have given full control for my user option(one among 4 options in security) and reopening the Android studio , it didn't post that warning again.一旦我完全控制了我的用户选项(安全性的 4 个选项之一)并重新打开 Android studio ,它就没有再次发布该警告。 So, before you try this option , please verify the security details of drive and make sure that it doesn't affect your further operations regarding security.因此,在您尝试此选项之前,请验证驱动器的安全详细信息,并确保它不会影响您进一步的安全操作。

I got that error on windows because the initial project location was C:\\ .我在 Windows 上遇到了这个错误,因为初始项目位置是C:\\ But the problem was solved when I made a folder and gave that path:但是当我创建一个文件夹并给出该路径时问题就解决了:

C:\\repo\\myApplication

I was having this same problem, then I plugged in a flash-drive.我遇到了同样的问题,然后我插入了闪存驱动器。 It allowed for a place to store the files with a location that did not have white space, was empty, and had enough room to store everything I needed.它允许有一个地方来存储文件,该位置没有空白,是空的,并且有足够的空间来存储我需要的所有东西。 The flash was the only way I found on my computer to store the files where the path was writable. Flash 是我在计算机上找到的唯一一种存储路径可写文件的方法。 Hope this helps someone.希望这可以帮助某人。

您可以自己创建该文件夹(或那些文件夹),然后再次运行安装程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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