运行到ios出错, Unable to find a target named `RunnerTests` in project `Runner.xcodeproj`, did find `Runner`.
Unable to find a target named `RunnerTests` in project `Runner.xcodeproj`, did find `Runner`
使用 Xcode 在 Flutter 项目中运行测试时会出现此错误。解决方案是向 Xcode 项目添加一个名为“RunnerTests”的新目标。
- Xcode打开项目选中Runner,
- (新建target) 右上角 File > New > Target.
- 在 "Test"类别下选择 "iOS Unit Testing Bundle",然后单击 "下一步"。
- 命名为"RunnerTests"然后点完成
- 关闭项目重启基本成功、原文还要走以下两步
- 在 "RunnerTests "目标设置的 "General "选项卡中,将 "Host Application "更改为 "Runner"。
- 关闭项目重启
原文:
Flutter Unable to find a target named RunnerTests in project Runner.xcodeproj, did find Runner.