执行as 工程名报错
来源:5-3 Android开发者的Flutter快速上手指南(一)

花王子
2023-06-11
执行as 工程名报错
clang -cc1as: error: error reading ‘工程名’
写回答
1回答
-
CrazyCodeBoy
2023-06-12
如果想通过as命令来启动Android Studio,需要为Android Studio设置别名as,以下是设置步骤:
1.找出Android Studio的路径。通常,它的路径可能是/Applications/Android\ Studio.app/Contents/MacOS/studio。
2.在Terminal中,打开你的bash或者zsh配置文件。如果你使用bash,输入open -e ~/.bash_profile。如果你使用zsh(macOS Catalina或更高版本的默认shell),输入open -e ~/.zshrc。
3.在打开的配置文件中,添加
alias as='/Applications/Android\ Studio.app/Contents/MacOS/studio'
注意,因为Android Studio的路径中有空格,所以你需要在Android\ Studio中间添加\来进行转义;另外,上面路径需要改为你的Android StudioDE的真实路径。
4.保持并关闭文件,关闭terminal。
5.重启terminal,然后测试as别是是否可以识别。10
相似问题