java.lang.IncompatibleClassChangeError: Class 'org.apache.http.message.BasicHeader' does not implement interface 'org.apache.http.NameValuePair'

北慕城南 提交于 2019-12-11 06:14:44

问题


I have an issue in Released APK. java.lang.IncompatibleClassChangeError Error comes when install and open release APK. But my debug APK is working properly. I saw lot of links and stackoverflow question but I didn't got any solution. What should I do?

java.lang.IncompatibleClassChangeError: Class 'org.apache.http.message.BasicHeader' does not implement interface 'org.apache.http.NameValuePair' in call to 'java.lang.String org.apache.http.NameValuePair.getName()' (declaration of 'com.android.volley.toolbox.BasicNetwork' appears in /data/app/com.mypackage.myprojectname-XI7DFLjbpTwZkGhQ3WYiBQ==/base.apk)
    at com.android.volley.toolbox.BasicNetwork.convertHeaders(SourceFile:3)
    at com.android.volley.toolbox.BasicNetwork.performRequest(SourceFile:8)
    at com.android.volley.NetworkDispatcher.run(SourceFile:8)

Any help will be appreciated. Thanks.


回答1:


I have added volley library & resolved my issue.

implementation 'com.android.volley:volley:1.1.1'


来源:https://stackoverflow.com/questions/56665050/java-lang-incompatibleclasschangeerror-class-org-apache-http-message-basichead

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!