簡體   English   中英

使用minSdkVersion 7

[英]Use minSdkVersion 7

我在我的應用程序中需要以下代碼:

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

但是我還需要將minSdkVersion設置為7,並且tha無法正常工作。 錯誤:

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.+'
}

沒有更小的編譯'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

最后了解你的問題。 Android 2.3.3及更高版本支持Google Play Services

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 希望對您有幫助

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM