2015-03-08 56 views
2

在我这用火力Android项目的gradle这个构建显示这恼人的警告:的gradle Android的建立与火力的依赖已经警告(忽略的HttpClient)

WARNING: Dependency org.apache.httpcomponents:httpclient:4.0.1 is ignored for devDebug as it may be conflicting with the internal version provided by Android. 
     In case of problem, please repackage it with jarjar to change the class packages 

我tryed添加排除选项上的build.gradle但我没有运气

compile ('com.firebase:firebase-client-android:2.2.1') { 
     exclude module: 'org.apache.httpcomponents:httpclient:4.0.1' //IGNORED 
    } 

我也tryed删除版本类似建议,但警告保留

compile ('com.firebase:firebase-client-android:2.2.1') { 
     exclude group:'org.apache.httpcomponents', module: 'httpclient' //SAME 
    } 
+0

一定要接受这些答案的一个帮助别人的未来。我意识到你有这样的等待期。 – Kato 2015-03-11 00:33:24

回答

4

我找到的选项删除警告

configurations { 
    compile.exclude group: "org.apache.httpcomponents", module: "httpclient" 
} 
2

如果我没有弄错,应该是

compile ('com.firebase:firebase-client-android:2.2.1') { 
     exclude group:'org.apache.httpcomponents', module: 'httpclient' 
} 

版本可以省略。

+0

它看起来与其他接受的答案相同,但警告与其他语法一起被删除 – 2015-03-11 17:50:14