Android Studio doesn't automatically include dynamic feature modules when building signed release APKs. But universal APKs can be created via the bundletool and signed later.
The gradle wrapper has a task for this already. This makes creating universal APKs easier since APK creation and signing are executed with one command and no separate download of bundletool
is required.
You can use packageReleaseUniversalApk
with the name of your base application module (e.g.: app
) to create a universal APK:
./gradlew :app:packageReleaseUniversalApk
This will however only create an unsigned APK unless you specify the signing informations in your gradle file or pass the information through the command line as shown below.