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
AndroidX Only Support
In 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.
WebViewAssetLoader Support
By default, the WebViewAssetLoader is 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 option hostname.
<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 the AndroidInsecureFileModeEnabled preference 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 aab Support
By default, release builds will now generate an aab formatted package type for release.
By nature, aab packages 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 to apk with the packageType flag.
Debug builds will continue to create an apk formatted package.
Tooling and Default Support Bump
targetSdk): 3030.0.37.1.11.5.204.2.24.3.5Node 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!
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.
Breaking:
AndroidXWebViewAssetLoaderaab package typetarget sdk@30 w/ build-tool@30.0.3gradle@7.1.1gradle@6.8.3kotlin@1.5.20kotlin@1.4.32kotlin@1.4.31android-gradle-plugin@4.2.2android-gradle-plugin@4.2.1android-gradle-plugin@4.1.3Google Services Gradle Plugin@4.3.5appcompat@1.3.0android.webkit@1.4.0com.github.dcendents:android-maven-gradle-plugingradle-bintray-plugin@1.8.5node 10 supportnpm): update all dependencieskeystore password promptjcenter & update dependenciespackage.jsonrun methodandroid SDK toolFeatures:
java 1.8 version checkwebkit version overrideCORDOVA_JAVA_HOME env variableWebViewAssetLoaderPluginEntry constructor to set onload propertyappcompat version to be configurableonRequestPermissionResult in favour for onRequestPermissionsResult for consistencyFixes:
getASPath.batWebViewAssetloader to default allow listsuper.onRequestPermissionsResult error (MissingSuperCall)requirements check): use regex to get java version from javac outputgradle.daemon settingRefactors:
gradle cleanupcheck_reqs): drop originalError param from check_android_targetenv/java): improve tests and implementationChores & Cleanup:
VERSION fileCI, Build & Testing: