【问题标题】:Use minSdkVersion 7使用 minSdkVersion 7
【发布时间】:2015-03-23 22:45:25
【问题描述】:

我的应用中需要这段代码:

//compile 'com.google.android.gms:play-services:6.+'

但我还需要 minSdkVersion 为 7,这不起作用。 错误:

Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 7 cannot be smaller than version 9 declared in library com.google.android.gms:play-services:6.1.71

这是我的 Gradle 的内容:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"

    defaultConfig {
        applicationId "codificador.aplicacion.safrapp.codificadorandroid"
        minSdkVersion 7
        targetSdkVersion 21
        versionCode 1
        versionName "1.0.0"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:21.0.0'
    //compile 'com.google.android.gms:play-services:6.+'
}

难道没有更小的版本的 compile 'com.google.android.gms:play-services?, 因为这是导致我的错误的原因。

更新: 我把它改成compile 'com.google.android.gms:play-services:5.0.89' 新错误:

Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 7 cannot be smaller than version 9 declared in library com.google.android.gms:play-services:5.0.89

【问题讨论】:

  • 编译'com.google.android.gms:play-services:5.0.89'
  • 我试过了,又出现一个错误:检查更新。
  • 你的清单是什么?
  • I also need the minSdkVersion to be 7 API 7 级已退出市场,如今:不到全球市场的 0.1%。 developer.android.com/about/dashboards/index.html

标签: java android-studio google-admin-sdk


【解决方案1】:

终于明白你的问题了。 Google Play Services 支持Android 2.3.3 及以上版本。设置此:

compile 'com.google.android.gms:play-services:6.1.71' // or 6.1.+

compile 'com.google.android.gms:play-services:5.0.89' 

并设置 minSdkVersion 15 。希望对你有很大帮助

【讨论】:

  • 但我需要我的 minSdkVersion 为 7
猜你喜欢
  • 2016-04-19
  • 1970-01-01
  • 2017-04-19
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-12-09
  • 2019-02-10
  • 1970-01-01
相关资源
最近更新 更多