-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fix(android): use remove(0) instead of removeFirst() for compatibilit… #1838
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
Conversation
…y with Android < 15
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1838 +/- ##
=======================================
Coverage 72.24% 72.24%
=======================================
Files 23 23
Lines 1841 1841
=======================================
Hits 1330 1330
Misses 511 511 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Can you explain the rationale and what problem this is fixing? Both APIs, removeFirst and remove(int) are supported by the Android SDK since API 1 with no deprecation notices. |
When i updatet to the latest Cordova-android Version + set the target SDK to 35 my app was crashing on android 11.
with my fork everything is working again. |
I'm keeping this closed for now, because I don't really think removing
The fact that a core API 1 API is using an JDK 21 API suggest that you may have your java source/target compatibility set to 21+... or it may just be enabled due to targeting API 35, which implies a desugaring issue. In my research I couldn't really find a concrete answer. Your android project should not be using anything higher than JDK 11, which is the default configuration the Android Studio uses when creating new android projects. There are multiple ways to configure the source/target JDK settings:
Not to confuse Java Source & Target Compatibility settings with Android Compile & Target SDK which is something completely different. If you can, can you confirm that your project is configured to use JDK source/target compatibility 11? The fact that the codebase is trying to JDK 21 API is troublesome and if it's happening inside |
…y with Android < 15
Platforms affected
Motivation and Context
Description
Testing
Checklist
(platform)
if this change only applies to one platform (e.g.(android)
)