-
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
Breaking change in patch 1.16.2: ThreadLocal#withInitial not in android API < 26. #2022
Labels
duplicate
This is a duplicate issue or root-cause of another issue
Comments
sixcolors
changed the title
Breaking change in patch 1.16.2: ThreadLocal not in android api < 26.
Breaking change in patch 1.16.2: ThreadLocal#withInitial API not in android api < 26.
Oct 28, 2023
sixcolors
changed the title
Breaking change in patch 1.16.2: ThreadLocal#withInitial API not in android api < 26.
Breaking change in patch 1.16.2: ThreadLocal#withInitial not in android API < 26.
Oct 28, 2023
Hi there -- you will need to enable desugaring in your build to bring the Java compatibility up to 1.8. Please see this note from the readme: Android support Happy for feedback on how to make this required setting more obvious! (Dupes #2000) |
This was referenced Apr 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
v1.16.2 introduces a breaking change for older android clients: https://developer.android.com/reference/java/lang/ThreadLocal#withInitial(java.util.function.Supplier%3C?%20extends%20S%3E)
Exception java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done (AsyncTask.java:325)
at java.util.concurrent.FutureTask.finishCompletion (FutureTask.java:354)
at java.util.concurrent.FutureTask.setException (FutureTask.java:223)
at java.util.concurrent.FutureTask.run (FutureTask.java:242)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:607)
at java.lang.Thread.run (Thread.java:762)
Caused by java.lang.NoSuchMethodError: No static method withInitial(Ljava/util/function/Supplier;)Ljava/lang/ThreadLocal; in class Ljava/lang/ThreadLocal; or its super classes (declaration of 'java.lang.ThreadLocal' appears in /system/framework/core-oj.jar)
at org.jsoup.internal.StringUtil. (StringUtil.java:338)
at org.jsoup.internal.StringUtil.borrowBuilder (StringUtil.java:348)
at org.jsoup.helper.UrlBuilder. (UrlBuilder.java:30)
at org.jsoup.helper.HttpConnection$Base.url (HttpConnection.java:422)
at org.jsoup.helper.HttpConnection$Request.url (HttpConnection.java:580)
at org.jsoup.helper.HttpConnection.url (HttpConnection.java:138)
at org.jsoup.helper.HttpConnection.connect (HttpConnection.java:78)
at org.jsoup.Jsoup.connect (Jsoup.java:94)
The text was updated successfully, but these errors were encountered: