Flutter 2.x 升级到 3.10.1 版本之后,原来正常编译的项目,iOS环境下(Xcode Version 13.2.1 (13C100)),编译报错:
1 2 3 4 5 |
$ 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`. |
- Open the Runner.xcodeproj in Xcode.
- Click on the "Runner" project in the left sidebar.
-
Go to File > New > Target.
-
Select "Unit Testing Bundle" under the "Test" category and click Next.
-
Name the target "RunnerTests" and click Finish.
- 关闭项目,重新编译即可解决
参考链接
Flutter Unable to find a target named RunnerTests in project Runner.xcodeproj, did find Runner.