Flutter Unable to find a target named RunnerTests in project Runner.xcodeproj, did find Runner.
绑定Apple Pay、Google Pay、支付宝和微信支付进行日常消费
This error occurs when running tests in a Flutter project with Xcode. The solution is to add a new target called "RunnerTests" to the Xcode project. To do this, follow these steps:
- Open the Runner.xcodeproj in Xcode.
- Click on the "Runner" project in the left sidebar.
- Go to File > New > Target.
- Select "iOS Unit Testing Bundle" under the "Test" category and click Next.
- Name the target "RunnerTests" and click Finish.
- In the "General" tab of the "RunnerTests" target settings, change the "Host Application" to "Runner".
- Run the tests again and the error should be resolved.