我无法在Google Play商店中更新:版本错误

时间:2015-01-29 16:37:28

标签: android gradle android-studio google-play

我正在尝试在Google Play商店中更新我的应用,但我不能,它发给我这个错误:

This setting can not be published for the following reasons:
Do not allow a device to update the version of API levels in the range 15-18 API levels in the range 19+ pass from version 8 to version 7. This happens when
Screen layouts with [small, normal, large, xlarge] and
Features with [android.hardware.screen.PORTRAIT, android.hardware.TOUCHSCREEN].

消息说版本配置为API版本15-18,这很奇怪,因为这是我的build.grade文件:

apply plugin: 'android'

android {
    compileSdkVersion 21
    buildToolsVersion '21.1.2'
    defaultConfig {
        minSdkVersion 15
        targetSdkVersion 21
        versionCode 8
        versionName "1.7"
        applicationId 'xxx.xxxx.xxxxxx'
    }
    buildTypes {
        release {
            minifyEnabled false
            debuggable false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
    lintOptions {
        checkReleaseBuilds false
        // Or, if you prefer, you can continue to check for errors in release builds,
        // but continue the build even when errors are found:
        abortOnError false
    }
    productFlavors {
    }
}

dependencies {
    compile 'com.android.support:support-v13:+'
    compile 'com.android.support:support-v4:+'
    compile project(':libraries:facebook')
    compile(name:'android-widevine-plugin-4.2.8', ext:'aar')
    compile(name:'android-sdk-4.2.8', ext:'aar')
}

发布的应用版本为7,因此不是问题。

这是我可以上传到Google Play商店的最新版本的build.gradle文件

apply plugin: 'android'

android {
    compileSdkVersion 19
    buildToolsVersion '19.0.0'

    defaultConfig {
        minSdkVersion 15
        targetSdkVersion 19
        versionCode 7
        versionName "1.6"
    }
    buildTypes {
        release {
            debuggable false
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

dependencies {
    compile 'com.android.support:support-v13:+'
    compile 'com.android.support:support-v4:+'
    compile project(':libraries:facebook')
    compile files('lib/OoyalaSDK.jar')
}

请帮帮我。谢谢

1 个答案:

答案 0 :(得分:1)

检查你的依赖关系,也许其中一个限制了最大值。 API的版本。

compile(name:'android-widevine-plugin-4.2.8', ext:'aar')
compile(name:'android-sdk-4.2.8', ext:'aar')