12

I received this error while uploading my APK to GooglePlay: "APKs supporting Android Wear must have a minimum SDK version of at least 23, this APK has 20."

Both my mobile app and wear app have their minimum SDKs set to 20.

I've never had any problems updating my app previously, this appears to be a new restriction.

Is it a valid error? I thought the minimum SDK for Wear is 20 [Android 4.4W / Kitkat]

I tried un-ticking: "Pricing & Distribution: Distribute your app on Android Wear [ ]", but the error still occurs.

The problem is that I have folks using SDKs 21 & 22 as well. Also, while it is a dedicated Wear app, it has some utility as a standalone mobile app as well.

Any advice?

Elletlar
  • 3,136
  • 7
  • 32
  • 38

3 Answers3

9

Apparently these rejections are due to changes Google made in preparation for Android Wear 2.0 standalone apps. Sometimes this restriction is inadvertently blocking phone apps that contain Android Wear 1.0 apps due to a manifest entry.

If you have a uses-feature manifest entry in your host/phone app for android.hardware.type.watch, remove it and you should be able to upload and get past the validation. Complete manifest entry below:

<uses-feature
    android:name="android.hardware.type.watch"
    android:required="false />
dcwilcox
  • 166
  • 5
  • 1
    Confirmed: 1. Removed the 'uses-feature' mentioned above 2. The app deployed to the watch and functioned correctly 3. Uploading to GooglePlay worked. [Min SDK set to 20, Target and Compile SDKs set to 25]. Thanks, – Elletlar Nov 19 '16 at 12:11
  • This doesn't work. Uploaded ok, but when you go to the play store listing it says "This app is incompatible with all of your devices." – phreakhead Nov 28 '16 at 04:05
4

I have same problem and I couldn't find different solution to upload Multiple APK. This solution is not best(there is no wear support 23-) but no way to upload APK.

First I seperate AndroidManifest.xml 23- between 23+ cause of

<uses-feature
    android:name="android.hardware.type.watch"
    android:required="false"/>

App gradle:

productFlavors {
    demoVer {
        versionName = android.defaultConfig.versionName + "-TEST"
    }
    prodVer {
        signingConfig signingConfigs.config
        minSdkVersion 17
        maxSdkVersion 22
        versionCode 74
    }
    prodVerMin23 {
        signingConfig signingConfigs.config
        minSdkVersion 23
        versionCode 75
    }
}

dependencies {wearApp project(path: ':wearapp', configuration: 'prodVerMin23Release')}

Wear gradle:

compileSdkVersion 23
buildToolsVersion "23.0.3"

defaultConfig {
    minSdkVersion 20
    targetSdkVersion 23
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
productFlavors {
    prodVerMin23 {
        minSdkVersion 20
    }
}
klcmin
  • 66
  • 4
2

I ran into the same problem and found that you have to upload Multiple APKs to Google Play. One APK which supports API level 23 and up (included wear 23 and up) and another one which supports API level 20 to 22 (included wear 20 to 22).

More info: https://developer.android.com/google/play/publishing/multiple-apks.html

P.S.: Sorry for my English.

Roland Szép
  • 879
  • 1
  • 8
  • 19
  • Thanks. I didn't verify this solution because removing the feature "android.hardware.type.watch" from the mobile manifest fixed the problem without any immediately noticeable side effects. – Elletlar Nov 19 '16 at 12:23
  • More on getting it to work for wear 2.0: https://developer.android.com/wear/preview/features/app-distribution.html – phreakhead Nov 28 '16 at 04:47