错误:无法生成IRGen表达式,没有其他错误 [英] error: Couldn't IRGen expression, no additional error

查看:306
本文介绍了错误:无法生成IRGen表达式,没有其他错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在我的UI测试中打印调试信息.配置:Xcode 10和SWIFT 4.2.

I can not print debug information in my UI TESTS. Configuration: Xcode 10 and SWIFT 4.2.

当我尝试在控制台中打印某些内容时,我只会看到一个错误:

When I try to print something in console I can only see an error:

"error: Couldn't IRGen expression, no additional error" 

在早期版本的Xcode(8,9等)中,我没有任何问题,仅在Xcode 10中没有问题.当我放置断点并尝试打印例如应用程序po XCUIApplication()之类的东西时,我什么也不能打印那.

I didn't have any problem in earlier versions of Xcode (8,9 etc), only in Xcode 10. I can not print anything, when I put breakpoint and try to print for example app po XCUIApplication() or something like that.

在Xcode的早期版本中,当我在控制台中编写时:

In the earlier version of Xcode when I write in console:

"po XCUIApplication.debugDescription()"我看到了我的应用程序的结构.

"po XCUIApplication.debugDescription()"I saw the structure of my application.

我们发现,当将外部框架添加到UI测试目标时,就会出现问题.我们创建了一个包含 RxSwift.framework 的示例项目,该项目可用于重现我们的问题:

We found that the problem appears when an external framework is added to the UI Tests Target. We've created an example project with RxSwift.framework included which can be use to reproduce our issue:

https://drive.google.com/file/d/1BlByFVNaOdDqT4ED9Jwyi1kJ99PTRQen/view?usp = sharing

致谢.

推荐答案

我对迦太基有同样的问题.但是,在更仔细地查看控制台时,我发现Carthage而不是构建RxSwift而是下载了预构建的二进制文件

I had same issue with Carthage. However while looking more closely at console I've spotted that Carthage instead of building RxSwift just downloaded pre-built binaries,

*** Downloading RxSwift.framework binary at "Zürich"

反过来又导致IRGen错误.因此,迫使迦太基构建框架而不是下载二进制文件是可行的.

that in turn contribute to IRGen error. So forcing Carthage to build framework instead of downloading binary worked.

carthage update --platform iOS --no-use-binaries

这篇关于错误:无法生成IRGen表达式,没有其他错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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