为什么我的 Xcode 项目上的测试是红色的? [英] Why are the tests red on my Xcode project?

查看:33
本文介绍了为什么我的 Xcode 项目上的测试是红色的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我查看左侧的导航器时,我的项目的测试框架是红色的.我怎么让它变黑?

When I look through my navigator on the left hand side my test framework for my project is red. How do I get it to turn black?

推荐答案

项目导航器(左侧窗格的第一个选项卡)中的任何红色表示:缺少相应的文件.因此,如果它是一个目标文件,只需重建该目标,然后 Xcode 就会创建一个新的目标文件.但如果是源代码或任何其他资源文件:

Anything red inside project navigator (The very first tab of left hand side pane) means: the corresponding file is missing. So if it is a target file, simply rebuild that target and Xcode makes a new one. But if it's a source code or any other resource file:

  1. 选择红色标记的文件
  2. 从右侧的文件检查器菜单中选择浏览按钮
  3. 重新定位丢失的文件

某些 xctest 目标将始终保持红色,因为 Xcode 不会为它们存储文件.但这不是问题.

Some xctest targets will remain always red, because Xcode doesn't store a file for them. But it's not a problem.

这篇关于为什么我的 Xcode 项目上的测试是红色的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆