We are happy to announce that we have just released Cordova Android 10.0.0! This is one of Cordova's supported platforms for building Android mobile applications.
To upgrade:
cordova platform remove android
cordova platform add android@10.0.0
Release Highlights
-
AndroidXOnly SupportIn this release, we have completely migrated to the AndroidX library and no longer support the Android Support Library. All plugins that continue to use the Android Support Library will need to be updated to reference the new AndroidX library.
If plugins have not been updated, you can still use the cordova-plugin-androidx-adapter plugin, which can be used to migrate the legacy references to the new AndroidX references.
-
WebViewAssetLoaderSupportBy default, the
WebViewAssetLoaderis enabled and allows apps to serve their content from a 'proper' origin. This will makes routing work easily for frameworks like Angular.With no additional configurations, the app content is served from
https://localhost/. You can configure the hostname by setting the preference optionhostname.<preference name="hostname" value="localhost" />The scheme,
https, is not configurable by nature.Please note that this is a breaking change that will cause data associated with the
file://scheme, such as cookies, local storage, local cache, and web-based databases, to be lost. You will need to handle the migration of data. If you are unable to migrate the data at this time, you can revert this setting by setting theAndroidInsecureFileModeEnabledpreference flag.<preference name="AndroidInsecureFileModeEnabled" value="true" />Setting this flag will keep the content on the
file://scheme, which Google reports to be insecure. -
Android App Bundles
aabSupportBy default, release builds will now generate an
aabformatted package type for release.By nature,
aabpackages can not be deployed or pushed manually to a device for testing. If you need to test a release build, you will need to change the package type back toapkwith thepackageTypeflag.Debug builds will continue to create an
apkformatted package. -
Tooling and Default Support Bump
- Target SDK (
targetSdk):30 - SDK Build Tool:
30.0.3 - Gradle:
7.1.1 - Kotlin:
1.5.20 - Android Gradle Plugin (AGP):
4.2.2 - Google Services Gradle Plugin:
4.3.5
- Target SDK (
-
Node Support
Since Node 10 is no longer being supported by the Node.js team, we have dropped support for Node 10.
-
Java 11 Support
With the current release of Android Studio 4.2, the Android tooling can now support running on Java 11. Please note that this does not mean you can start compiling Java 11 source code.
Please report any issues you find at issues.cordova.io!
Notice of Issue
There is a known issue for users or plugins that enable the Google Services Gradle plugin.
https://github.com/apache/cordova-android/issues/1284
We are preparing and aiming for a patch release vote within the next three days.
Full Changelog
Breaking:
- GH-1052 feat!: only support
AndroidX - GH-1137 feat!: implement
WebViewAssetLoader - GH-1268 feat!: release build defaults to
aabpackage type - GH-1182 feat!: bump
target sdk@30w/build-tool@30.0.3 - GH-1257 feat!: upgrade
gradle@7.1.1 - GH-1197 feat!: upgrade
gradle@6.8.3 - GH-1256 feat!: upgrade
kotlin@1.5.20 - GH-1204 feat!: upgrade
kotlin@1.4.32 - GH-1200 feat!: upgrade
kotlin@1.4.31 - GH-1255 feat!: upgrade
android-gradle-plugin@4.2.2 - GH-1232 feat!: upgrade
android-gradle-plugin@4.2.1 - GH-1198 feat!: upgrade
android-gradle-plugin@4.1.3 - GH-1199 feat!: upgrade
Google Services Gradle Plugin@4.3.5 - GH-1262 feat!: bump
appcompat@1.3.0 - GH-1258 feat!: bump
android.webkit@1.4.0 - GH-1252 feat!: drop abandoned
com.github.dcendents:android-maven-gradle-plugin - GH-1212 feat!: unify & fix gradle library/tooling overrides
- GH-1138 feat(allow-list)!: integrate and refactor core plugin
- GH-1201 feat!: upgrade jfrog
gradle-bintray-plugin@1.8.5 - GH-1279 chore!: bump all dependencies
- GH-1278 chore!: drop
node10 support - GH-1205 chore! (
npm): update all dependencies - GH-1274 cleanup!: remove deprecated settings & add todo comments
- GH-1048 cleanup!: remove
keystorepassword prompt - GH-1251 cleanup!: drop
jcenter& update dependencies - GH-1269 refactor!: do not copy JS lib to platform project
- GH-1270 refactor(Api)!: use version from
package.json - GH-1266 refactor(run)!:
runmethod - GH-1083 refactor!: drop support for
androidSDK tool - GH-1100 refactor!: remove most platform binaries
Features:
- GH-1241 feat: remove
java1.8 version check - GH-1254 feat: support
webkitversion override - GH-1229 feat:
CORDOVA_JAVA_HOMEenv variable - GH-1222 feat: add backwards compatibility mode for
WebViewAssetLoader - GH-1166 feat: overload
PluginEntryconstructor to set onload property - GH-1208 feat: allow
appcompatversion to be configurable - GH-1047 feat: Deprecated
onRequestPermissionResultin favour foronRequestPermissionsResultfor consistency
Fixes:
- GH-1283 fix: add missing apache-license header to
getASPath.bat - GH-1275 fix: add
WebViewAssetloaderto default allow list - GH-1216 fix: request focus after custom view hided
- GH-1264 fix: missing
super.onRequestPermissionsResulterror (MissingSuperCall) - GH-563 fix(build): support tilde expansion on Windows
- GH-1220 fix(
requirementscheck): use regex to get java version from javac output - GH-1227 fix(prepare): delete splash screens if none are used
- GH-1228 fix: java checks
- GH-1276 fix: remove forced default
gradle.daemonsetting
Refactors:
- GH-1265 refactor: do not infer project root from script location
- GH-1267 refactor: use target SDK of built APK to determine best emulator
- GH-1253 refactor:
gradlecleanup - GH-1260 refactor(
check_reqs): droporiginalErrorparam fromcheck_android_target - GH-1246 refactor(
env/java): improve tests and implementation
Chores & Cleanup:
- GH-1273 chore: remove old
VERSIONfile - GH-1272 cleanup: delete old ANT & Eclipse files
- GH-1141 cleanup: remove app cache settings
CI, Build & Testing:
