[英]java.lang.NoSuchMethodError org.apache.http.client.entity.UrlEncodedFormEntity.<init> in Android Studio
I'm making a Reddit app using the jReddit wrapper and I'm having trouble with the apache http client throwing the above exception. 我正在使用jReddit包装器制作Reddit应用程序,但在apache http客户端抛出上述异常时遇到了麻烦。 My dependencies look like this:
我的依赖关系如下所示:
and my libraries look like this: 我的库看起来像这样:
I have seen other questions on SO regarding similar exceptions, with people saying they may have two of the same jars in their classpath, but I am yet to find an answer which provides me with a solution of how to check for or eliminate duplicate/deprecated jars. 我曾在SO上看到过类似类似异常的其他问题,有人说他们的类路径中可能有两个相同的jar,但是我还没有找到答案,这为我提供了一种如何检查或消除重复/弃用的解决方案。罐子。 Does anyone know how to solve this?
有谁知道如何解决这个问题? Any help greatly appreciated, thanks.
任何帮助,不胜感激,谢谢。
Disclaimer: I am the current maintainer for jReddit project. 免责声明:我是jReddit项目的当前维护者。
We recently released a new version of the jreddit library, which is 1.0.3. 我们最近发布了jreddit库的新版本1.0.3。
Can you try changing your dependencies to this? 您可以尝试更改对此的依赖性吗?
dependencies {
compile('com.github.jreddit:jreddit:1.0.3') {
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
exclude module: 'junit'
}
compile 'org.apache.httpcomponents:httpclient-android:4.3.5.1'
compile 'com.android.support:appcompat-v7:22.0.0'
}
Also, I've explained in another question regarding an android example. 另外,我在另一个有关android示例的问题中做了解释。 Check out this guy
看看这个家伙
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.