简体   繁体   English

Mac 中的 Android Studio 路径错误

[英]Android studio path error in Mac

I am getting this error when I open Android Studio:打开 Android Studio 时出现此错误:

System path '/Users/username/Library/Caches/AndroidStudio2.1' is invalid.系统路径 '/Users/username/Library/Caches/AndroidStudio2.1' 无效。 If you have modified the 'idea.system.path' property please make sure it is correct, otherwise please re-install the IDE.如果您修改了 'idea.system.path' 属性,请确保它是正确的,否则请重新安装 IDE。

How can I fix it?我该如何解决?

I fixed this issue by doing the following:我通过执行以下操作解决了这个问题:

  • Open your "Applications" folder打开您的“应用程序”文件夹

  • Right click on Android Studio then choose "Show Package Contents"右键单击 Android Studio,然后选择“显示包内容”

  • Navigate to the "bin" folder导航到“bin”文件夹

  • Open the "idea.properties" file with a text edit tool and add this property to the bottom of the file:使用文本编辑工具打开“idea.properties”文件,并将此属性添加到文件底部:

    idea.system.path='/Users/MacName/Library/Caches/AndroidStudio3.1' idea.system.path='/Users/MacName/Library/Caches/AndroidStudio3.1'

    then save the file.然后保存文件。

Run Android Studio again and it should work.再次运行 Android Studio,它应该可以工作了。

I fixed on my mac like this instead and it works:我像这样固定在我的 mac 上,它可以工作:

Open your "Applications" folder Right click on Android Studio then choose "Show Package Contents" Navigate to the "bin" folder Open the "idea.properties" file with a text edit tool and add this property to the bottom of the file: idea.log.path=/Users/macUser/Library/Cache/AndroidStudio3.1打开您的“应用程序”文件夹右键单击Android Studio,然后选择“显示包内容”导航到“bin”文件夹使用文本编辑工具打开“idea.properties”文件并将此属性添加到文件底部:idea .log.path=/Users/macUser/Library/Cache/AndroidStudio3.1

then save the file.然后保存文件。

Run Android Studio again and it should work.再次运行 Android Studio,它应该可以工作了。

just check the folder permission in , Replace "xxx" with username只需检查文件夹权限,用用户名替换“xxx”

/Users/xxx/Library/Application Support/Google

It needs read/Write/Execute Permission.它需要读/写/执行权限。 Will have to run sudo chmod 777 .必须运行sudo chmod 777 . to fix and relaunch the Android Studio修复并重新启动 Android Studio

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

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