Closed MS893 closed 5 years ago
I add the detail of the IOException "Cleartext HTTP traffic to URL not permitted"
SORRY, this is not a bug from Jsoup, just the API 28 which change the cleartext disabled by default.
https://stackoverflow.com/questions/45940861/android-8-cleartext-http-traffic-not-permitted
https://developer.android.com/training/articles/security-config#CleartextTrafficPermitted
https://medium.com/@son.rommer/fix-cleartext-traffic-error-in-android-9-pie-2f4e9e2235e6
I perform a Jsoup get request
Document doc = Jsoup.connect(url).timeout(25000).get();
I use 1.11.3 version of Jsoup
implementation 'org.jsoup:jsoup:1.11.3'
When I compile using API 27, it's working fine and return the document with html.
compileSdkVersion 27
(minSdkVersion 14 and targetSdkVersion 27)When I compile using API 28, I have got an IOException when executing the get.
compileSdkVersion 28
(minSdkVersion 14 and targetSdkVersion 28)My other dependencies