從git上pull完iOS
項(xiàng)目之后冀墨,在項(xiàng)目工程里終端命令執(zhí)行pod install
報(bào)錯(cuò)諸如以下錯(cuò)誤:
1.錯(cuò)誤:
Analyzing dependencies
Downloading dependencies
Installing AFNetworking (3.1.0)
[!] Error installing AFNetworking
[!] /usr/bin/git clone https://github.com/AFNetworking/AFNetworking.git /var/folders/5z/1pd1v4ns1gjdhqmbmv83zwzh0000gn/T/d20210528-84046-m7bk3p --template= --single-branch --depth 1 --branch 3.1.0
Cloning into '/var/folders/5z/1pd1v4ns1gjdhqmbmv83zwzh0000gn/T/d20210528-84046-m7bk3p'...
fatal: unable to access 'https://github.com/AFNetworking/AFNetworking.git/':
解決:打開(kāi)hosts
文件,sudo vi /etc/hosts
屏蔽github.com
比如我的是
#192.30.255.113 github.com
報(bào)錯(cuò)2:
運(yùn)行工程運(yùn)行會(huì)報(bào):/Pods/Target Support Files/xxx/xxx.xcconfig: unable to open file (in target
解決:在項(xiàng)目中的TARGETS
->Build Phases
將[CP] Copy Pods Resources
寸认、[CP] Embed Pods Frameworks
刪掉報(bào)錯(cuò)所提示的文件或者點(diǎn)擊右邊x
整個(gè)刪除即可衣赶。