【问题标题】:Brownfield | Stetho | ":com.facebook.stetho:stetho-okhttp:1.2.0' depends on one or more Android Libraries but is a jar"棕地 |听筒 | ":com.facebook.stetho:stetho-okhttp:1.2.0' 依赖于一个或多个 Android 库,但它是一个 jar"
【发布时间】:2017-03-14 15:05:29
【问题描述】:

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

":com.facebook.stetho:stetho-okhttp:1.2.0' 依赖于一个或多个 Android 库但是是一个 jar"

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

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

【问题讨论】:

    标签: java android facebook gradle react-native


    【解决方案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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-05-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-10-15
      • 1970-01-01
      相关资源
      最近更新 更多