我正在将React原住民集成到一个Android项目中,我遇到了这个gradle问题。
“:com.facebook.stetho:stetho: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。
有没有人经历过这样的经历或者有什么想法?
发布于 2017-03-14 16:21:09
解决了!你得把斯泰索排除在格拉德尔之外。查看发表意见
添加到依赖项:
compile ("com.facebook.react:react-native:+") {
exclude group:'com.facebook.stetho', module:'stetho'
}此外,Stetho已经从Android库中删除。关于为什么被删除,以及如何重新开始使用它的文章
https://stackoverflow.com/questions/42789585
复制相似问题