Search code examples
androidgoogle-playpublishpublishing

Publishing the same app with different versions


I'm working on an app and I want to have three versions for sale. Basically an economy, standard, and advanced version. I have a switch where you change a variable and that sets what version is compiled.

When I try to publish the app, it says that an app with the package name already exists.

Do I need to sign each package with a unique key, or do I need to change the whole package name for each version? If I need to change the package name, what is the easiest way to do it?

Thanks.


Solution

  • You should convert your project to Android Library. And then create three application projects, each of which would have different package names with different "variable".

    1. com.you.package.economy, -> sets variable to economy
    2. com.you.package.standard -> sets variable to standard
    3. com.you.package.advanced, -> sets variable to advanced

    For more information about Android Libraries see documentation. If you need more in-depth information how Android Libraries work see my post.