【问题标题】:Could not resolve project :detox无法解决项目:detox
【发布时间】:2018-06-30 13:17:02
【问题描述】:

我刚刚开始为我的项目实施 Detox for android。

但是,我遇到了Error:Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve project :detox'. 的问题

当我按照自述文件中的所有步骤操作时,我不确定自己做错了什么。

【问题讨论】:

  • 哪个版本的排毒?
  • 嗨@Antoni4,它是^5.10.0
  • 老实说,在尝试在 Android 上运行时,我在 Detox v.7.0.0-alpha.1 上遇到了同样的错误。
  • 我在 GitHub 上建议尝试使用 Detox v7.0.1。您一定要使用 v5.10.0 吗?你可以试试 Detox v7.0.1 吗?
  • 我尝试使用 npm update 来更新排毒。但是在它之后,它仍然是5.10.0。而且我不确定 5.10.0 是否可以与 react native 0.48.4 一起运行。因为我们可能需要坚持使用这个 react native 版本。感谢您的回复。

标签: react-native detox


【解决方案1】:

Detox 的版本是 7.0.1,React Native 是 0.48.4

我设法让它工作了

androidTestImplementation(project(path: ":detox")) {
    exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestImplementation 'junit:junit:4.12', {
    exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestImplementation 'com.android.support.test:runner:1.0.1', {
    exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestImplementation 'com.android.support.test:rules:1.0.1', {
    exclude group: 'com.android.support', module: 'support-annotations'
}

后来,我立即遇到了应用程序崩溃,所以我检查了一下,应用程序在 react-native run-android 或 detox 测试后崩溃的解决方案是一些依赖版本,尤其是关于 gsm 等。

【讨论】:

  • 嗨 :) 不要忘记将此标记为已接受的答案,以便将您的问题标记为已解决
  • 嗨@Antoni4,谢谢你,我一直在等待检查我的答案。但我不知道我需要选择勾号。继续尝试支持我的答案哈哈哈。谢谢
猜你喜欢
  • 1970-01-01
  • 2020-06-04
  • 2019-03-17
  • 2013-07-01
  • 1970-01-01
  • 2014-09-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多