Reputation: 113
I've recently closed in on the release phase of a pet project application that uses both Android Wear and the mobile. I've uploaded it as an Alpha release to the Play Developer Console, and the Wear portion was approved as well, but when viewing the store listing, the compatibility overview shows up as if only the mobile APK was being offered.
I've tried to make it recognize both versions by following a few tips here:
<uses-permission>
elements are identical in bothwearApp
declaration in the GradlefileThe developer docs say that I need to enable "Advanced mode" on the "APK Files page", but since the Console has transitioned to Release Manager, I don't think that's an option any more, and it keeps accepting only one APK, either the phone or the wear, but not both. During testing, naturally, the Wear device could run the APK without any issues, both in debug as well as instant run mode, even from the menu (no ADB connection required).
wear.build
apply plugin: 'com.android.application'
android {
lintOptions {
disable 'MissingTranslation'
}
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "tech.provingground.divemonitor"
minSdkVersion 23
targetSdkVersion 25
versionCode 6
versionName "1.0.0-remote"
}
signingConfigs {
release {
storeFile file("[path/to/file]")
storePassword "[redacted]"
keyAlias "mobile keystore"
keyPassword "[redacted]"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
}
dependencies {
provided 'com.google.android.wearable:wearable:2.0.0'
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.google.android.support:wearable:2.0.0'
compile 'com.google.android.gms:play-services-wearable:10.2.1'
// https://mvnrepository.com/artifact/commons-io/commons-io
compile 'commons-io:commons-io:2.5'
compile project(':commons')
}
mobile.build
apply plugin: 'com.android.application'
android {
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
lintOptions {
disable 'MissingTranslation'
}
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "tech.provingground.divemonitor"
minSdkVersion 24
targetSdkVersion 25
versionCode 6
versionName "1.0.0-local"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
signingConfigs {
release {
storeFile file("[path/to/file]")
storePassword "[redacted]"
keyAlias "mobile keystore"
keyPassword "[redacted]"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
wearApp project(':wear')
// https://mvnrepository.com/artifact/commons-io/commons-io
compile project(':commons')
compile 'com.google.android.gms:play-services-wearable:10.2.1'
compile 'com.google.android.gms:play-services-location:10.2.1'
compile 'commons-io:commons-io:2.5'
compile 'com.android.support.constraint:constraint-layout:1.0.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind
compile 'com.fasterxml.jackson.core:jackson-databind:2.9.0.pr2'
// https://mvnrepository.com/artifact/com.fasterxml.jackson.dataformat/jackson-dataformat-csv
compile 'com.fasterxml.jackson.dataformat:jackson-dataformat-csv:2.9.0.pr2'
testCompile 'junit:junit:4.12'
}
Upvotes: 1
Views: 466
Reputation: 653
Make sure the versionCode
attributes of the two APKs differ. Only then will they coexist.
Upvotes: 1