布朗菲尔德| Stetho | “:com.facebook.stetho:stetho-okhttp:1.2.0'取决于一个或多个Android库,但它是一个罐子”

时间:2017-03-14 15:05:29

标签: java android facebook gradle react-native

我正在将React Native集成到Android项目中,而且我遇到了这个问题。

  

“:com.facebook.stetho:stetho-okhttp:1.2.0'取决于一个或多个Android库但是是一个罐子”

Module 'com.facebook.stetho:stetho-okhttp:1.2.0' depends on one or more Android Libraries but is a jar
Module 'com.facebook.stetho:stetho-okhttp:1.2.0' depends on one or more Android Libraries but is a jar

 FAILED
:uscs_core_mobile:buildInfoGeneratorE3PRODLogsDebug

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':uscs_core_mobile:prepareE3PRODLogsDebugDependencies'.
> Dependency Error. See console for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

注意:上面是我在使用--stacktrace

运行后看到的内容

当我检查我的应用时,我实际上看不到stetho-okhttp:1.2.0,而是看到stetho:1.4.1

有没有人经历过这个或有想法?

1 个答案:

答案 0 :(得分:1)

解决!你需要从gradle中排除stetho。查看issue comments

添加到依赖项:

compile ("com.facebook.react:react-native:+") {
    exclude group:'com.facebook.stetho', module:'stetho'
  }

此外,Stetho已从Android库中删除。 文章 why is was removed and how to start using it again