Skip to content
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

Unable to use Jetty 10.0.15 on Android API 23 #9676

Closed
joakime opened this issue Apr 25, 2023 · 4 comments
Closed

Unable to use Jetty 10.0.15 on Android API 23 #9676

joakime opened this issue Apr 25, 2023 · 4 comments
Assignees

Comments

@joakime
Copy link
Contributor

joakime commented Apr 25, 2023

Jetty Version:
10.0.14

I'm using Cometd 5.0.15, which depends on Jetty 9.4.51, and getting the same errors with minSdk 23.
However, the method name it's happening in has changed (ModuleLocation.apply instead of ModuleLocation.getModuleLocation), exactly according to #6053

MethodHandle.invoke and MethodHandle.invokeExact are only supported starting with Android O (--min-api 26): Lorg/eclipse/jetty/util/ModuleLocation;apply(Ljava/lang/Class;)Ljava/net/URI;

In its turn, CometD 6.0.10 (Jetty 10.0.14) fails with this
MethodHandle.invoke and MethodHandle.invokeExact are only supported starting with Android O (--min-api 26): Lorg/eclipse/jetty/util/TypeUtil;getLocationOfClass(Ljava/lang/Class;)Ljava/net/URI;

Desperately need help, I'm stuck at CometD 3.1.14, which is 3 years old already and has been deprecated.

Originally posted by @amatsehor-atd in #6128 (comment)

@joakime
Copy link
Contributor Author

joakime commented Apr 25, 2023

Per the Android Java SDK documentation.

Your use of Android 0 (undefined) is where you are doing things wrong (you need to define the Android API level properly in your project, seek Android specific websites for advice on this)

Your desire to use minSdk 23 is also incompatible, you must be on minSdk 26.

@joakime joakime self-assigned this Apr 25, 2023
@joakime joakime changed the title Unable to use Jetty 10.0.15 on Android Unable to use Jetty 10.0.15 on Android API 23 Apr 25, 2023
@amatsehor-atd
Copy link

It's actually Android O, not 0 (from Oreo)

Yes, I understand that lifting minSdk from 23 to 26 can solve a problem, but it's not possible for me now sadly.
But wasn't the whole idea of #6052 to allow using 9.4.x+ versions to run on Android <26 ?

@joakime
Copy link
Contributor Author

joakime commented Apr 25, 2023

Considering that targeting Android API level 26 represents 93.3% of all Android users, we will not be spending the inordinate effort to adjust Jetty 10 to satisfy the remaining 6.7% of Android users that don't want to upgrade.

Jetty 9.x is now at End of Community Support, and will not be getting updated without a support contract (see announcement for details)

@joakime
Copy link
Contributor Author

joakime commented Apr 25, 2023

Note that Google and the AOSP community (all vendors) have the following support for (select) Android versions.

See

Android Version API Level %Users Left Using Final Patch Date Dropped Support from AOSP (and all vendors)
Android 8 API Level 26 6.7% Oct 2021 Nov 2021
Android 7 API Level 25 5.6% Oct 2019 Nov 2019
Android 6 API Level 23 1.8% Sept 2018 Oct 2018

You are basically requesting that we support a version of Android that is unsupported by everyone.

@joakime joakime closed this as completed Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants