gpt4 book ai didi

java - 棕地 |听诊器 | ":com.facebook.stetho:stetho-okhttp:1.2.0' 依赖于一个或多个 Android 库但是是一个 jar”

转载 作者:行者123 更新时间:2023-11-30 00:39:21 25 4
gpt4 key购买 nike

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

":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
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

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

最佳答案

解决了!您需要从 gradle 中排除听诊器。查看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

关于java - 棕地 |听诊器 | ":com.facebook.stetho:stetho-okhttp:1.2.0' 依赖于一个或多个 Android 库但是是一个 jar”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42789585/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com