java.lang.NoSuchFieldError: org.apache.http.message.BasicHeaderValueFormatter.INSTANCE android

后端 未结 1 1129

trying to upload large video using below code but getting this error<java.lang.NoSuchFieldError: org.apache.http.message.BasicHeaderValueFormatter.INSTANCE>.

1条回答
  •  感情败类
    2021-01-06 17:56

    Your code could get rid off the deprecated code of MultipartEntityand use MultipartEntityBuilder. However the specific problem related here is that the core Android libraries conflict with the newly added ones. Also now there are maven repositories available. You could include the following code into the below file:

    build.grade (Module:app)

    compile('org.apache.httpcomponents:httpmime:4.3.6') {
        exclude module: 'httpclient'
    }
    compile 'org.apache.httpcomponents:httpclient-android:4.3.5'
    

    It is pretty much simple to work the way around. Thanks to oleg for the answer here

    0 讨论(0)
提交回复
热议问题