Android Httpclient [NoSuchMethodError:org.apache.http.entity.ContentType.create]

前端 未结 3 1539
情书的邮戳
情书的邮戳 2021-02-06 10:55

I want upload image from android to spring controller. I already connected android with spring using rest api call (httpclient) My code is :

final String jsonUse         


        
3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-06 11:15

    I was also doing same like you, then i have just used same library version and it worked,

    I don't know how, but below code solved my problem

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

提交回复
热议问题