Generating APK with all dynamic features
I think you can't create full apk directly form source.
You should take 3 steps:
Build app bundle:
./gradlew clean bundleRelease
Generate one apk by bundletool with switch --mode=universal
java -jar bundletool-all-0.10.2.jar build-apks --bundle=app.aab --output=release.apks --ks=release.keystore --ks-pass=pass:xxxxxx --ks-key-alias=xxxxxxkey --key-pass=pass:xxxxxx --mode=universal
Unzip generated file:
unzip release.apks