1

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.

13
  • Did you enable proguard ? Commented Jun 19, 2019 at 10:03
  • Yes I have enabled proguord Commented Jun 19, 2019 at 10:05
  • -dontnote org.apache.http.** -dontwarn org.apache.** -dontwarn org.apache.** add in proguard file Commented Jun 19, 2019 at 10:07
  • check this post for your proguard settings Commented Jun 19, 2019 at 10:09
  • @Pavya Same Error Commented Jun 19, 2019 at 10:15

1 Answer 1

3

I have added volley library & resolved my issue.

implementation 'com.android.volley:volley:1.1.1'
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.