Android 6.0 HTTPClient issue with LG G3 phone

后端 未结 2 2062
闹比i
闹比i 2021-02-06 19:16

Hi I am using DefaultHTTPClient class to create http request.

The currrent code execute() method works on all phones including Nexus and Samsung with Android 6.0.

<
2条回答
  •  無奈伤痛
    2021-02-06 19:55

    Ran into something similar and had a fix I'm trying that I added to another question


    I ran into a similar issue today and just started using HttpClient for Android

    1. Added dependency compile 'org.apache.httpcomponents:httpclient-android:4.3.5.1' to build.gradle.
    2. Replace new DefaultHttpClient() with HttpClientBuilder.create().build()

    There are probably some other minor refactors you might need to make in other portions of the code, but that should be pretty straight forward.

提交回复
热议问题