diff --git a/buildozer/default.spec b/buildozer/default.spec index 4b05bfc6c..ef20b37b5 100644 --- a/buildozer/default.spec +++ b/buildozer/default.spec @@ -162,6 +162,11 @@ fullscreen = 0 # (list) Gradle dependencies to add #android.gradle_dependencies = +# (bool) Enable the AndroidX support library when True, the default is False. +# When enabled, add a specific AndroidX package using android.gradle_dependencies +# AndroidX packages require android.api = 28 or greater +#android.enable_androidx = False + # (list) add java compile options # this can for example be necessary when importing certain java libraries using the 'android.gradle_dependencies' option # see https://developer.android.com/studio/write/java8-support for further information diff --git a/buildozer/targets/android.py b/buildozer/targets/android.py index d8337e4e2..bffe66d16 100644 --- a/buildozer/targets/android.py +++ b/buildozer/targets/android.py @@ -1157,6 +1157,11 @@ def build_package(self): if wakelock: build_cmd += [("--wakelock", )] + # AndroidX ? + enable_androidx = config.getbooldefault('app', 'android.enable_androidx', False) + if enable_androidx: + build_cmd += [("--enable-androidx", )] + # intent filters intent_filters = config.getdefault( 'app', 'android.manifest.intent_filters', '')