Getting NoSuchFieldError INSTANCE org/apache/http/message/BasicHeaderValueParser

后端 未结 6 669
無奈伤痛
無奈伤痛 2020-11-27 16:54

I\'m working on an app on Android. I\'m using httpcore 4.3.3. I get this when I try to use ContentType.parse(string)

java.lang.NoSuchFieldError:         


        
6条回答
  •  温柔的废话
    2020-11-27 17:08

    Simple solution is to use:

    https://code.google.com/p/httpclientandroidlib/

    It's the Appache HttpClient port for android wrap in a different package name so that will not interfere with the existing version in Android. Import the jar in the Android project and instead of "org.apache.http" use "ch.boye.httpclientandroidlib."

提交回复
热议问题