CocoaPods报错小结

一· Android studio Exception: CocoaPods not installed or not in valid state.

最近升级了Mac系统(12.5)后发现问题
Xcode(13.1)和android studio(version 2020.3)

android studio 显示未安装CocoaPods

Mac上已经安装过了CocoaPods, 并且 pod install 没有问题,Xcode运行没有问题, 但是直接点击Android studio上的运行按钮会报如下错误:

Warning: CocoaPods is installed but broken. Skipping pod install. ... ... Exception: CocoaPods not installed or not in valid state.

这应该是android studio软件的问题,这个时候我们可以使用它自带的terminal 运行flutter run,发现可以运行;

使用终端命令打开android studio:

open /Applications/Android\ Studio.app

然后再使用android studio上自带的运行按钮,发现可以运行了;

再次关闭android studio,重新手动打开android studio,再次点击运行,发现可以了;

二· unable to access 'https://github.com/CocoaPods/pod-template.git/': error:02FFF036:system library:func(4095):Connection reset by peer

image.png

解决:

git config --global http.proxy
git config --global --unset http.proxy

创建一个本地pod库的时候一直报错,使用上面的方法解决了。

你可能感兴趣的:(CocoaPods报错小结)