Migrating to AndroidX

#1

We have begun migrating all of the officially supported extensions to AndroidX. AndroidX is an improvement to the original Android Support Library, which is no longer maintained. All recent updates to Google Services such as Push, Games, Analytics and more are based on the AndroidX libraries. Facebook has also rolled out new versions of their SDK which only support AndroidX.

We will keep supporting the old versions of the extensions for as long as possible, but it is recommended that you migrate soon to not miss out on important bugfixes.

With this change it is extra important that you never depend directly on the master branch of any dependencies. You should always depend on a specific release to avoid breaking changes as the libraries get updated.

extension-camera
AndroidX: https://github.com/defold/extension-camera/archive/2.0.0.zip
Support Library: https://github.com/defold/extension-camera/archive/1.0.0.zip

extension-gpgs
AndroidX: https://github.com/defold/extension-gpgs/archive/2.0.0.zip
Support Library: https://github.com/defold/extension-gpgs/archive/1.3.3.zip

extension-push
AndroidX: https://github.com/defold/extension-push/archive/3.0.0.zip
Support Library: https://github.com/defold/extension-push/archive/2.0.2.zip

extension-facebook
AndroidX: https://github.com/defold/extension-facebook/archive/3.0.0.zip (uses Facebook SDK 7.1.0 for Android and SDK 6.5.1 for iOS)
Support Library: https://github.com/defold/extension-facebook/archive/2.6.0.zip (uses Facebook SDK 6.5.1 for Android and iOS)

extension-iac
extension-iap
extension-webview
extension-adinfo
extension-videoplayer-native
No dependency on the support libraries.

extension-firebase
Built using the Firebase C++ SDK (v 6.16.0). No dependency on support libraries.

We will update this post with additional libraries as we migrate them to AndroidX.

15 Likes

#2

Do you anticipate any breaking changes? Or should this be pretty much seamless?

0 Likes

#3

There should be no breaking changes. Android X libraries use new package names for all classes but should work the same as the old versions.

The problem is that you can’t mix old and new libraries, so either all of your dependencies need to migrate or none. We will handle migration of all our extensions, and we recommend or community to also migrate theirs.

It is usually just a matter of updating your dependency versions in build.gradle and then importing the AndroidX classes, like this:

1 Like