I am trying to add some functionality to an existing application. The app's build.gradle contains several productFlavors and a couple of buildTypes. I have tried to replicate that as best I can in my dynamic-feature module, but I cannot seem to get it to install properly from Android Studio.
I followed the example from: https://github.com/googlearchive/android-dynamic-features to set up my feature module, so my project is structured like
app
features/module/build.gradle
build.gradle
I added a buildType and flavor to the app build.gradle
defaultConfig {
minSdkVersion 24
targetSdkVersion 28
}
dynamicFeatures = [":features:module"]
buildTypes{
myBuildType {
debuggable true
multiDexEnabled true
}
}
flavorDimensions "blah"
productFlavors{
arm64 {
ndk {
abiFilters "arm64-v8a"
}
ext {
abiVersionCode = 5
}
matchingFallbacks = ['defaultFlavor']
}
}
and in the module build.gradle, I have attempted to match that with:
defaultConfig {
minSdkVersion 24
targetSdkVersion 28
}
buildTypes {
dynamic {
multiDexEnabled true
debuggable true
}
}
flavorDimensions "blah"
productFlavors {
arm64 {
ext {
abiVersionCode = 5
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':app')
}
In my Run->Edit Configuration screen, I have put a checkbox next to both the base app and the module under the dynamic features to deploy section. I am trying to test this on a Nokia 6, with Android 9.0 running on it. The only output I get from the build is:
01/12 22:39:25: Launching 'app' on HMD Global TA-1025.
Installation did not succeed.
The application could not be installed: INSTALL_FAILED_INVALID_APK
The APKs are invalid.