配置 Firebase 后,我嘗試使用 Visual Studio 代碼在 iPhone 8 上運行模擬器 IOS 15.2,并使用命令“無需除錯即可運行”,但出現此錯誤:
Launching lib/main.dart on iPhone 8 in debug mode... CocoaPods' output:
Error output from CocoaPods: Ignoring ffi-1.14.2 because its extensions are not built.
Try: gem pristine ffi --version 1.14.2
[!] Automatically assigning platform `iOS` with version `9.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
Error running pod install Error launching application on iPhone 8.
Exited (sigterm)
當我運行錯誤建議時:
ismac@ismails-MacBook-Pro flutter_chat % gem pristine ffi --version 1.14.2
Ignoring ffi-1.14.2 because its extensions are not built. Try: gem pristine ffi --version 1.14.2
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.
你能幫我么 ?
uj5u.com熱心網友回復:
這是對我有用的解決方案。
按照這個視頻:https ://www.youtube.com/watch?v= EXp0gq9kGxI 然后打開 ios 檔案夾中的 Podfile 并更改:
“#平臺:ios,'9.0'”到“平臺:ios,'current_version_of_ios'”
current_version_of_ios :在您閱讀此解決方案的那一刻,然后在運行模擬器之前,這是 IOS 的真實版本:
從 iOS 檔案夾中洗掉 podfile.lock 檔案,然后轉到 ios 檔案夾并運行以下命令
Pod install
它將安裝您的 podfile 中的所有軟體包。
此外,您需要設定目標平臺。留在 iOS 檔案夾中并運行以下命令
open Runner.xcworkspace
然后您的應用程式將在 XCode 中打開。單擊“Runner”并將您的目標平臺設定為 8.0。我使用此方法修復了我的 iOS 構建問題,希望這對您有用。
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/411422.html
標籤:
