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
): 30
30.0.3
7.1.1
1.5.20
4.2.2
4.3.5
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!
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:
AndroidX
WebViewAssetLoader
aab
package typetarget sdk@30
w/ build-tool@30.0.3
gradle@7.1.1
gradle@6.8.3
kotlin@1.5.20
kotlin@1.4.32
kotlin@1.4.31
android-gradle-plugin@4.2.2
android-gradle-plugin@4.2.1
android-gradle-plugin@4.1.3
Google Services Gradle Plugin@4.3.5
appcompat@1.3.0
android.webkit@1.4.0
com.github.dcendents:android-maven-gradle-plugin
gradle-bintray-plugin@1.8.5
node
10 supportnpm
): update all dependencieskeystore
password promptjcenter
& update dependenciespackage.json
run
methodandroid
SDK toolFeatures:
java
1.8 version checkwebkit
version overrideCORDOVA_JAVA_HOME
env variableWebViewAssetLoader
PluginEntry
constructor to set onload propertyappcompat
version to be configurableonRequestPermissionResult
in favour for onRequestPermissionsResult
for consistencyFixes:
getASPath.bat
WebViewAssetloader
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_target
env/java
): improve tests and implementationChores & Cleanup:
VERSION
fileCI, Build & Testing: