Use a different set of resources in Android (not runtime, but compiletime)

I want to create two different APKs from my Android app. The difference between them is the images in the res / drawable directory. I know that at runtime you can use a different set of resources depending on the language settings, hardware or something else, but how to do it? (is it possible to specify a different directory, then res / drawable?)

(I am currently copying / replacing all resources every time I want to create a new version)

+4
source share
3 answers

Looks like you need to use Ant build tools.

Create a custom folder in your project that contains folders with different assets for each APK, then use the Ant construct with the appropriate configuration file that you need to create to create the project with the appropriate resources and files before compiling it.

Good luck

Update:

Here is a tutorial on using Ant build tool with Android: Android Ant build tutorial

+4
source

Perhaps you should use the assets? I find a link that talks about resources and assets !: here

0
source

One of the possibilities can be to use 2 different library projects and include projects of your images / values ​​in them. you will have to change the project properties every time you need to compile another library project

This is a bit uncomfortable, but will work ...

Hope this helps

0
source

Source: https://habr.com/ru/post/1397058/


All Articles