Android-在Mac环境遇到You have not agreed to the Xcode license agreements

图片来源网络,入侵必删

最近几天在家办公,我使用家里的Macbook Pro开发,在Android Studio中开发遇到:
Cannot check the working tree for unmerged files because of an error.

这是Git代码管理工具报的错,具体的解决办法如下:
1.在mac的终端输入:

sudo xcodebuild -license

输入这个指令之后,需要回车输入电脑密码,然后在回车,终端界面会出现一大串的协议。我们可以通过空格或者回车跳过。

2.在协议的最后,我们需要输入agree

By typing 'agree' you are agreeing to the terms of the software license agreements. Type 'print' to print them or anything else to cancel, [agree, print, cancel] agree

3.重启Android Studio就可以正常拉取代码了。

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容