-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android 7 and lower compatibility problem #2000
Comments
Hi Greg - can you please see this note from the readme: Android support Enabling that configuration should fix the issue. Could you please test and confirm? |
This issue was fixed a while back; it requires core library desugaring to work on Android versions below 8. |
Thank you for the kind answer. Guess it is an alternative, although for now it seems an overkill for my app to pull a lot more code and components necessary for desugaring for the sake of one line of code. I'll consider this in the future, if necessary, for now will just use my own slightly modified build of jsoup. An awesome product, by the way. I did support it financially in the past, but years ago, maybe it's time to express my gratitude again in that way. Greg |
There's a minimal configuration available, maybe you could give that a try: https://developer.android.com/studio/write/java11-minimal-support-table |
Thank you again. I confirm that desugaring fixes this problem, although adds over 200 kB to my app's APK size. It's probably safer to use it for the future changes in jsoup or other libraries. |
Thanks @Isira-Seneviratne and @gregko for resolving the issue. BTW:
Thanks for your feedback, much appreciated! But just for the record -- so far I have not / jsoup has not solicited or received any donations. I'm hoping this is just a mistaken memory :) and not an unscrupulous site that pretends to accept donations on behalf of open source work. Please ping me directly (jonathan@hedley.net) if we should dive deeper into this. |
I'm sorry, most probably mistaken memory. The project in which I use jsoup goes on since 2012 (although I'm not sure at which point I started using jsoup in it), and I tried to support many of open source projects that I use there. I apologize again. Greg |
StringUtil.java in line 338 has this code:
However on Android 7 and lower (or maybe 6 and lower) the method ThreadLocal.withInitial() is not available, and the users of my Android app with older devices experience a crash. For now I replaced it with:
Hopefully this or similar work-around could be incorporated into the official version of JSOUP... Thanks!
Greg
The text was updated successfully, but these errors were encountered: