1.podfile拉取最新的了, podspec 庫,也 update 最新版本了,但是項目 pods 庫里依然拉取不到最新的:
解決:在 podfile 所在目錄里,作了更改,需要提交或者撤銷后才能拉取到最新的依賴配置.
2.更新到指定庫
例如:想要更新AF庫的時候
pod update AFNetworking --verbose --no-repo-update
3.通過命令行修改遠程地址
方法一:通過命令行修改遠程地址
cd json
git remote set-url origin https://gitee.com/jouypub/json.git
方法二:先刪除原有倉庫地址,然后添加新地址
cd json
git remote rm origin
git remote add origin https://gitee.com/jouypub/json.git
方法三:修改配置文件
cd json/.git
vim config
[core]
repositoryformatversion = 0
filemode = true
logallrefupdates = true
precomposeunicode = true
[remote "origin"]
# 修改成新的倉庫地址
url = https://gitee.com/jouypub/json.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
4.invalid byte sequence in US-ASCII錯誤
在flutter項目中集成原生的阿里云視頻,需要手動添加Pods文件,項目使用XCODE啟動正常,但是使用VSCode 運行時一直報錯:
CocoaPods requires your terminal to be using UTF-8 encoding
Consider adding the following to ~/.profile:
export LANG=en_US.UTF-8
解決方案: 終端打開~/.bash_profile (open ~/.bash_profile)
編輯并添加 export LANG=en_US.UTF-8
退出并保存
還可以運行該echo $LANG命令以查看變量是否已正確配置。
VSCODE 重新運行 若仍然顯示錯誤,退出vscode 重新啟動打開vscode。