<i id='aFiN4'><tr id='aFiN4'><dt id='aFiN4'><q id='aFiN4'><span id='aFiN4'><b id='aFiN4'><form id='aFiN4'><ins id='aFiN4'></ins><ul id='aFiN4'></ul><sub id='aFiN4'></sub></form><legend id='aFiN4'></legend><bdo id='aFiN4'><pre id='aFiN4'><center id='aFiN4'></center></pre></bdo></b><th id='aFiN4'></th></span></q></dt></tr></i><div id='aFiN4'><tfoot id='aFiN4'></tfoot><dl id='aFiN4'><fieldset id='aFiN4'></fieldset></dl></div>
      <bdo id='aFiN4'></bdo><ul id='aFiN4'></ul>
    <legend id='aFiN4'><style id='aFiN4'><dir id='aFiN4'><q id='aFiN4'></q></dir></style></legend>
  • <small id='aFiN4'></small><noframes id='aFiN4'>

    <tfoot id='aFiN4'></tfoot>

      1. Gradle 传递依赖排除未按预期工作.(我如何摆脱

        时间:2023-09-26
      2. <i id='zwgGA'><tr id='zwgGA'><dt id='zwgGA'><q id='zwgGA'><span id='zwgGA'><b id='zwgGA'><form id='zwgGA'><ins id='zwgGA'></ins><ul id='zwgGA'></ul><sub id='zwgGA'></sub></form><legend id='zwgGA'></legend><bdo id='zwgGA'><pre id='zwgGA'><center id='zwgGA'></center></pre></bdo></b><th id='zwgGA'></th></span></q></dt></tr></i><div id='zwgGA'><tfoot id='zwgGA'></tfoot><dl id='zwgGA'><fieldset id='zwgGA'></fieldset></dl></div>

        <small id='zwgGA'></small><noframes id='zwgGA'>

            <tbody id='zwgGA'></tbody>
                <bdo id='zwgGA'></bdo><ul id='zwgGA'></ul>

                <tfoot id='zwgGA'></tfoot>

                <legend id='zwgGA'><style id='zwgGA'><dir id='zwgGA'><q id='zwgGA'></q></dir></style></legend>

                • 本文介绍了Gradle 传递依赖排除未按预期工作.(我如何摆脱 com.google.guava:guava-jdk5:13.0 ?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  这是我的 build.gradle 的片段:

                  here is a snippet of my build.gradle:

                  compile 'com.google.api-client:google-api-client:1.19.0'
                  compile 'com.google.apis:google-api-services-oauth2:v2-rev77-1.19.0'
                  compile 'com.google.apis:google-api-services-plus:v1-rev155-1.19.0'
                  compile 'com.google.appengine.tools:appengine-gcs-client:0.4.1'
                  compile 'com.google.appengine.tools:appengine-mapreduce:0.8'
                  

                  它导入多个版本的番石榴,如您在dependencyInsight中看到的那样:

                  which imports multiple version of guava as you can see with dependencyInsight:

                  com.google.guava:guava:15.0 (conflict resolution)
                  
                  com.google.guava:guava:14.0.1 -> 15.0
                  +--- com.googlecode.objectify:objectify:4.1.3
                  |    --- default
                  --- net.eusashead.spring:spring-cache-gae:1.0.0.RELEASE
                       --- default
                  
                  com.google.guava:guava:[15.0,15.99] -> 15.0
                  +--- com.google.appengine.tools:appengine-gcs-client:0.4.1
                  |    +--- default
                  |    +--- com.google.appengine.tools:appengine-mapreduce:0.8
                  |    |    --- default
                  |    --- com.google.appengine.tools:appengine-pipeline:0.2.10
                  |         --- com.google.appengine.tools:appengine-mapreduce:0.8 (*)
                  +--- com.google.appengine.tools:appengine-mapreduce:0.8 (*)
                  --- com.google.appengine.tools:appengine-pipeline:0.2.10 (*)
                  
                  com.google.guava:guava-jdk5:13.0
                  --- com.google.api-client:google-api-client:1.19.0
                       +--- default
                       +--- com.google.apis:google-api-services-oauth2:v2-rev77-1.19.0
                       |    --- default
                       +--- com.google.apis:google-api-services-plus:v1-rev155-1.19.0
                       |    --- default
                       +--- com.google.appengine.tools:appengine-gcs-client:0.4.1
                       |    +--- default
                       |    +--- com.google.appengine.tools:appengine-mapreduce:0.8
                       |    |    --- default
                       |    --- com.google.appengine.tools:appengine-pipeline:0.2.10
                       |         --- com.google.appengine.tools:appengine-mapreduce:0.8 (*)
                       +--- com.google.api-client:google-api-client-appengine:1.17.0-rc
                       |    --- com.google.appengine.tools:appengine-gcs-client:0.4.1 (*)
                       +--- com.google.apis:google-api-services-storage:v1-rev1-1.18.0-rc
                       |    --- com.google.appengine.tools:appengine-gcs-client:0.4.1 (*)
                       +--- com.google.apis:google-api-services-bigquery:v2-rev154-1.19.0
                       |    --- com.google.appengine.tools:appengine-mapreduce:0.8 (*)
                       --- com.google.api-client:google-api-client-servlet:1.17.0-rc
                            --- com.google.api-client:google-api-client-appengine:1.17.0-rc (*)
                  
                  (*) - dependencies omitted (listed previously)
                  

                  我已尝试通过以下方式删除对 : 的依赖:

                  I have tried removing the dependency to : by doing:

                  compile ('com.google.api-client:google-api-client:1.19.0'){
                          exclude group: 'com.google.guava', module: 'guava-jdk5'
                      }
                  compile ('com.google.api-client:google-api-client:1.19.0'){
                          exclude group: 'com.google.guava', 
                      }
                  

                  但dependencyInsight 保持不变.我也试过了

                  but the dependencyInsight remains the same. I also tried

                  compile ('com.google.guava:guava:15.0'){force = true}
                  

                  但依赖性洞察力仍然保持不变.如何摆脱 com.google.guava:guava-jdk5:13.0 ?

                  but again dependency insight remains the same. How do I get rid of com.google.guava:guava-jdk5:13.0 ?

                  详情:我在 Windows 8.1 机器上尝试过 gradle 1.2 和 2.1

                  Details: I've tried gradle 1.2 and 2.1 on a windows 8.1 box

                  我尝试这个的原因是为了摆脱这个异常:

                  The reason for me to try this is to get rid of this exception:

                  java.lang.NoSuchMethodError: com.google.common.base.Stopwatch.createStarted()Lcom/google/common/base/Stopwatch;
                  

                  推荐答案

                  原来guava-jdk5还在维护中.

                  It turns out that guava-jdk5 is still being maintained.

                  所以我改变了这个:

                  compile ('com.google.guava:guava:15.0'){force = true}
                  

                  为此:

                  compile('com.google.guava:guava-jdk5:17.0') { force = true }
                  

                  这解决了我的问题,我现在可以使用 Google App Engine 项目中com.google.common"包中的类以及所有描述的依赖项

                  And that fixed my issues, I can now use classes from the 'com.google.common' package in Google App Engine project with all the described dependencies

                  这篇关于Gradle 传递依赖排除未按预期工作.(我如何摆脱 com.google.guava:guava-jdk5:13.0 ?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:Mapreduce 组合器 下一篇:多行文本到一个地图

                  相关文章

                  最新文章

                  <small id='lXgfQ'></small><noframes id='lXgfQ'>

                • <tfoot id='lXgfQ'></tfoot>

                    <i id='lXgfQ'><tr id='lXgfQ'><dt id='lXgfQ'><q id='lXgfQ'><span id='lXgfQ'><b id='lXgfQ'><form id='lXgfQ'><ins id='lXgfQ'></ins><ul id='lXgfQ'></ul><sub id='lXgfQ'></sub></form><legend id='lXgfQ'></legend><bdo id='lXgfQ'><pre id='lXgfQ'><center id='lXgfQ'></center></pre></bdo></b><th id='lXgfQ'></th></span></q></dt></tr></i><div id='lXgfQ'><tfoot id='lXgfQ'></tfoot><dl id='lXgfQ'><fieldset id='lXgfQ'></fieldset></dl></div>
                    <legend id='lXgfQ'><style id='lXgfQ'><dir id='lXgfQ'><q id='lXgfQ'></q></dir></style></legend>
                    • <bdo id='lXgfQ'></bdo><ul id='lXgfQ'></ul>