Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for androidx #2020

Closed
tito opened this issue Nov 12, 2019 · 3 comments
Closed

Support for androidx #2020

tito opened this issue Nov 12, 2019 · 3 comments

Comments

@tito
Copy link
Member

tito commented Nov 12, 2019

AndroidX is a new set of libraries that replaces the old Android "supports" libraries, and more.

We don't use supports libraries directly (if i recall correctly), but to activate androidx package, it requires a new file named gradle.properties with:

android.useAndroidX=true
android.enableJetifier=true
@misl6
Copy link
Member

misl6 commented Aug 28, 2020

It's starting to be quite a priority, in order to support the latest features on Google Play Services.

@RobertFlatt
Copy link
Contributor

RobertFlatt commented Nov 28, 2020

gradle.properties is an extra file we don't have to generate.
This can be implemented in bootstraps/common/build/templates/build.tmpl.gradle

Insert this block as the last item in the android{} block:

   ext {
      useAndroidX=true
      enableJetifier=true
   }

And if like me you are using "androidx.core.content.FileProvider", in buildozer.spec add:
android.gradle_dependencies = "androidx.core:core:1.3.2"

Other androidx classes may be in other packages https://maven.google.com/web/index.html

This requires android.api=28 or greater

I have used this to build and run an app implementing Android's file sharing feature.
I have not seen any side effects yet!

@misl6
Copy link
Member

misl6 commented Apr 6, 2022

Fixed via #2385

@misl6 misl6 closed this as completed Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants