使用CocoaPods 安裝 SDK報錯 [!] Invalid `Podfile` file: syntax error, unexpected do, expecting end-of-input.


官方給的文本有誤,正確版本為

# 自6.0.0起基礎地圖支持分包集成
platform :ios, '13.0' #手機的系統
use_frameworks! target
'YourProjectTarget' do #工程名字 pod 'BaiduMapKit', '6.0.0' # 默認集成全量包 # 可選組件 # pod 'BaiduMapKit/Map', '6.0.0' # 集成地圖Map包 # pod 'BaiduMapKit/Search', '6.0.0' # 集成地圖Search包 # pod 'BaiduMapKit/Cloud', '6.0.0' # 集成地圖Cloud包 # pod 'BaiduMapKit/Utils', '6.0.0' # 集成地圖Utils包 end

重點在於 'do' 不要換行 do' 不要換行  do' 不要換行 

第三行的'YourProjectTarget' 要修改為自己的工程名稱,不然會報錯  

[!] Unable to find a target named `YourProjectTarget` in project 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM