0

I would like to create a "pro" version of my Android app.
I have to slightly change the app name, and the package name, and so on.
I tried the refactor command (renaming com.appname.app into com.appname.pro.app) but I see that nothing changed.
How to achieve the real name refactoring?

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
P5music
  • 3,197
  • 2
  • 32
  • 81

2 Answers2

0

First, select the settings icon and then

Then uncheck compact empty middle package, then refractor (shift+F6) each package name and make sure it changes in manifest and all over and clean and rebuild the project Also, check this

Subin Babu
  • 1,515
  • 2
  • 24
  • 50
0

I assume you're using Gradle as a build tool. You should use productFlavors to achieve this.

Here's how :

android {
    productFlavors {
        free {
           applicationId "xyz.some.domain.free"
        }
        pro {
           applicationId "xyz.some.domain.pro"
        }
    }
}

place the above code inside your app level build.gradle file. To customise it more, read this.

You can then install pro/free version using Gradle tasks.

Balraj
  • 328
  • 2
  • 7