"在Android Wear上分发您的应用"被禁用

时间:2017-05-03 08:49:35

标签: android

在我的Android播放控制台"在Android Wear"上分发您的应用被禁用。

我添加了2个截图图片和3个apk文件: 1个应用程序 1穿1 1穿2

这是我的build.gradle文件:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    publishNonDefault true

    defaultConfig {
        applicationId "xxxxx"
        minSdkVersion 23
        targetSdkVersion 25
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
        wear1 {
            versionCode 17
            versionName "17.0"
        }
        wear2 {
            versionCode 18
            versionName "18.0"
            minSdkVersion 25
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.google.android.gms:play-services-wearable:10.2.1'
    compile 'com.google.android.support:wearable:2.0.1'
    provided 'com.google.android.wearable:wearable:2.0.1'
}

这是可穿戴的清单文件:

<uses-feature android:name="android.hardware.type.watch" />
<application ...>
    <meta-data
        android:name="com.google.android.wearable.standalone"
        android:value="true" />
    ...
</application>

这是移动gradle文件:

dependencies {
    compile 'com.google.android.support:wearable:2.0.0'
    compile 'com.google.android.gms:play-services-wearable:10.0.1'
    ...
    wearApp project(path:':Wearable', configuration: "wear1Release")
}

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"

    defaultConfig {
        applicationId = "xxx"
        minSdkVersion 18
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
    }
    ...
}

为什么禁用?

1 个答案:

答案 0 :(得分:0)

您的移动应用程序版本代码必须与可穿戴wear1产品风味的版本代码相匹配。