I have an application that includes a wear app. All works fine on debug tested with a real device. I can alse create the release apk that packs the wear apk inside it. But o
Thanks to the clue Scott gave me this is the full solution:
1.) Flavors must be lowercase
2.) dependency configurations must include flavorRelease
3.) In Wear app buil gradle, under android{}, we must include publishNonDefault true
So for mobile app build.gradle:
android {
......
productFlavors {
trial {
applicationId "com.sample.myapp.trial"
versionName "3.0.1"
versionCode 301
}
full {
applicationId "com.sample.myapp"
versionName "3.0.1"
versionCode 301
}
}
}
dependencies {
trialWearApp project(path: ':myWearApp', configuration: 'trialRelease')
fullWearApp project(path: ':myWearApp', configuration: 'fullRelease')
}
And for wear app build.gradle:
android {
publishNonDefault true
......
productFlavors {
trial {
applicationId "com.sample.myapp.trial"
versionName "3.0.1"
versionCode 301
}
full {
applicationId "com.sample.myapp"
versionName "3.0.1"
versionCode 301
}
}
}