Is it possible to create a different App version for each android version?

3

It has components that are not supported in previous versions of android, but have alternatives to them. Is there any way to keep components ideal for the ideal versions and the alternatives for those versions that do not support it?

    
asked by anonymous 12.10.2017 / 22:51

1 answer

3

It is possible, even if you are creating a project for each version.

The main problem with this approach is code repetition.,

This problem can be avoided by using another approach: Build variants .

Compilation variants are achieved using Gradle's ability to use specific rules to define combinations of code, features, and settings to generate different builds of the same project.

The possibilities are many, of which I highlight the following:

References:

Note: The support libraries solve most refers without the need to resort to compile variants.

    
13.10.2017 / 15:53