Question about AndroidX in extension

Hi just asking if we can use AndroidX in extension on Kodular Creator? Because I wasn’t able to compile it.

I’m quite sure you can’t.

Thanks! :blush:

AndroidX is a new way of organizing support libraries. To make it possible, Kodular Creator should have AndroidX library.However, Google announced that AndroidX library is now open source and is available on AOSP.

You can compile the library if you will create extension in your own environment.
:slight_smile:

1 Like

Thanks @golumaths100, I will think about it :wink:

1 Like

You can use the Extension Template Respository which uses AndroidX libs.

Extensions built with it (and imported AndroidX libs) won’t work with Kodular that is still using the Support Library.

2 Likes

My extensions use AndroidX and work perfectly fine with Kodular.

2 Likes

That shouldn’t be possible. Which extensions? So they work with Kodular & AI2?

If so, then there shouldn’t be any problems with the current version of the ExoPlayer (which requires AndroidX).

See e.g. here:

But maybe you can make an extension for the ExoPlayer (with AndroidX).
That would be great, but I have little hope.

See also here:

1 Like

They work with Kodular, so yes they work with AI2 as well.

With the latest update, Kodular brought support for newer APIs… Which means there (is) support for AndroidX.

1 Like

Who does that say from the Kodular team?
Where can I read this?

1 Like

my extension ZxingView version 2 -not released yet- uses androidX support library and works in AI2 and Kodular.

1 Like

Maybe someone from the Kodular team can shed some light on this.
@Vishwas

2 Likes

No one needs to confirm anything. If you paid attention to App Inventors GitHub, you’d see that AndroidX was added.

2 Likes

The question is it won’t compile with appinventor-sources. Will it work with extension-template?

Everyone knows that AI2 has been updated to the AndroidX libs since the nb184 release, but Kodular has not yet. So what are you trying to explain?

Why did @Shreyash have to adjust his extension Phase, so that it works with AI2?
So again: Maybe @Shreyash can shed some light on this.

See also here:

I had a chat with Diego (maybe in last month, iirc) where he mentioned that they haven’t migrated to AndroidX yet.

Although, as you might be aware that this will break all the extensions that rely on support library, I don’t see the possibility of Kodular migrating to AndroidX anytime soon (unless they find a way to Jetify the extensions and the libraries they use).

Like some users mentioned, it’s possible to use the AndroidX libraries in Kodular as well, but that will only result in increase in extension’s size as you’ll have to pack the desired library along with the extension like you normally do with any other library.

4 Likes

@Shreyash Thank you for the detailed explanations!

1 Like

In summary / conclusion:
All extensions using AndroidX or support libraries should be compiled / published with a version for AI2 and a version for Kodular in order to keep the respective extensions as small as possible
(as long as Kodular is still using the support library).

Correct?

2 Likes

But this is your opinion. Many developers may choose to do the opposite (such as me) to provide benefit to the user.

And what are these benefits?
That the extension is bigger should hardly be an advantage.