0

I'm new to Android development. I crated a project with two packages, each having their own launcher activities i.e, its kind of each package can be a separate application. Now is it possible to create a apk file for each package separately?

RAVITEJA SATYAVADA
  • 2,503
  • 23
  • 56
  • 88

3 Answers3

3

Now is it possible to create a apk file for each package separately?

Sorry but what you asking is not possible. Every project has always built only one apk.

but you can archive this by creating two different project with different Package Name.

M D
  • 47,665
  • 9
  • 93
  • 114
1

You can create a library project, that contains the main logic of your app.

And then you create two seperate projects that contain the application specific logic, launcher activities, icons, etc.

The application package's rely on the library for shared logic, and you compile them to their own apk.

GvS
  • 52,015
  • 16
  • 101
  • 139
0

When using the new build system you can create a separate apk for each buildType and flavor with different package identifiers.

This is kind of a steep learning curve for a beginner, but definitely worth it as it reduces the overall overhead for your purpose. Also it's the future.

Ben Weiss
  • 17,182
  • 6
  • 67
  • 87