问题描述
最近更新了Android Studio之后,我可以在调试模式下构建和运行应用,但由于以下错误,我无法再构建发行版:
After recent Android Studio update, I can build and run an app in the debug mode, but am no longer able to build the release version due to the following error:
我已阅读这篇文章和这篇文章.这两个答案都建议排除模块:'httpclient'".它不能解决我的案子的问题.我相当确定它与以下内容有关:
I have read this post and this post. Both answers suggest "exclude module: 'httpclient'". It does not solve the problem of my case. I am fairly sure it is related to the following:
compile 'commons-validator:commons-validator:1.6'
有人可以提供有关该疗法的小费吗?
Could anyone offer a tip on the remedy?
推荐答案
问题出在commons-logging.因此,必须将其排除在外.在app/build.gradle中添加以下代码.应该可以.
The problem is with commons-logging. So it must be excluded.Add the following code in app/build.gradle. It should work.
configurations {
all {
exclude module: 'httpclient'
exclude module: 'commons-logging'
}
}
这篇关于commons-validator和error"commons-logging定义了与Android现在提供的类冲突的类".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!