diff --git a/buildozer/default.spec b/buildozer/default.spec index 677b59be4..98e3c5840 100644 --- a/buildozer/default.spec +++ b/buildozer/default.spec @@ -186,6 +186,20 @@ fullscreen = 0 # 2) android.add_assets = source_asset_path:destination_asset_relative_path #android.add_assets = +# Copy/overwrite directories and its files in the android res directory in res/ +# from within the "android_resources" directory, as in the example below. +# Example, create: +# android_resources/ +# drawable/ +# graphic.png +# anim/ +# anim.xml +# xml/ +# strings.xml +# And then, you must pass the "android_resources" directory path to the add_res argument +# For general documentation see https://developer.android.com/guide/topics/resources/providing-resources +# android.add_res = "path/to/android_resources" + # (list) Gradle dependencies to add #android.gradle_dependencies = diff --git a/buildozer/targets/android.py b/buildozer/targets/android.py index 6d15b7ace..a1e910606 100644 --- a/buildozer/targets/android.py +++ b/buildozer/targets/android.py @@ -1179,6 +1179,11 @@ def build_package(self): meta = '{}={}'.format(key.strip(), value.strip()) build_cmd += [("--meta-data", meta)] + # add res + res = config.getdefault('app', 'android.add_res', '') + if res: + build_cmd += [("--add-res", join(self.buildozer.root_dir, res))] + # add extra Java jar files add_jars = config.getlist('app', 'android.add_jars', []) for pattern in add_jars: