java - 测试运行失败: Instrumentation run failed due to 'kotlin.UninitializedPropertyAccessException'

标签 java android kotlin

我遇到了一个问题,即我的 Android 仪器测试未被发现。相反,我得到以下内容:

Started running tests
Test running failed: Instrumentation run failed due to 
'kotlin.UninitializedPropertyAccessException'
Disconnected from the target VM, address: 'localhost:8600', transport: 'socket'
Empty test suite. 

最佳答案

我发现了这个问题,这是因为我有一个带有lateinit注释的属性没有被注入(inject)

关于java - 测试运行失败: Instrumentation run failed due to 'kotlin.UninitializedPropertyAccessException' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45697557/

相关文章:

kotlin - 使用 Kotlin 在 RxJava 中处理可空类型

android - 由 : org. gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException 引起: ':app:debugRuntimeClasspath'

java - Persistence.createEntityManagerFactory ("something")返回 null

android - Kotlin:使用 Gradle 进行增量编译

android - 是否有任何开发模式可以替代网络请求的 IntentService?

java - 图像不覆盖同名

kotlin - 如何组织 Kotlin 扩展方法

java - Oracle ADF 安全应用程序出现 HTTP 401 错误

java - EJB 3.2 - 无法正确配置远程客户端

java - 将Java连接到MySQL数据库