繁体   English   中英

尝试通过 VS Studio 和 Xcode 在 iphone 模拟器上运行我的应用程序,当我运行模拟器时出现此错误:

[英]Trying to run my app on an iphone simulator through VS Studio and Xcode and when I run the simulator I get this error:

/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:416:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:241:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:240:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:161:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

来自 CocoaPods 的错误 output:↳ [!] 自动分配平台iOS与目标Runner上的版本9.0 ,因为没有指定平台。 请在您的 Podfile 中为此目标指定一个平台。 请参阅https://guides.cocoapods.org/syntax/podfile.html#platform 运行 pod install 时出错 在 iPhone 13 Pro Max 上启动应用程序时出错。 退出

打开 Podfile。 您将看到一个平台并评论了 9.0。 取消注释并将版本更改为 11..

# Uncomment this line to define a global platform for your project
platform :ios, '11.0'

在 ios 目录中运行 pod install 然后在 xcode 中打开 xc 工作区文件并构建一次。 在此之后,所有后续构建都将从您的 ide 工作

试试这个方法:

  • 每当我运行一个新项目时,我都会遇到这个错误
cd iOS/
pod install
  • 然后关闭模拟器和vscode
  • 并再次运行该项目!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM