Unable to find a target named `RunnerTests` in project `Runner.xcodeproj`, did find `Runner`

Flutter 2.x 升级到 3.10.1 版本之后,原来正常编译的项目,iOS环境下(Xcode Version 13.2.1 (13C100)),编译报错:

$ ios %  pod install
Analyzing dependencies
[!] Unable to find a target named `RunnerTests` in project `Runner.xcodeproj`, did find `Runner`.

[!] Automatically assigning platform `iOS` with version `11.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`.

  1. Open the Runner.xcodeproj in Xcode.
  2. Click on the "Runner" project in the left sidebar.
  3. Go to File > New > Target.

  4. Select "Unit Testing Bundle" under the "Test" category and click Next.

  5. Name the target "RunnerTests" and click Finish.

  6. 关闭项目,重新编译即可解决

参考链接


Flutter Unable to find a target named RunnerTests in project Runner.xcodeproj, did find Runner.

发布者

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注