Chandramouli
Chandramouli

Reputation: 76

How to maintain two different version in single android app

I developed one application, Now I want to make my app free version and paid version. Free version contains few features, paid version contains all features. so How to maintain two versions with same code? Can any one help me.

Upvotes: 1

Views: 710

Answers (1)

Aster
Aster

Reputation: 877

Build flavors are a very good solution for this. See https://developer.android.com/tools/building/configuring-gradle.html for more information.

What I find very usefull is that you can replace specific files / values for your flavor and keep the rest the same. We've used it to build two different applications from the same code, only defering in layout and package names.

Upvotes: 2

Related Questions