sdk:minSdkVersion 1 cannot be smaller than version 7

电脑杂谈  发布时间:2019-10-05 05:02:44  来源:网络整理

分针端点的周期为转速为角速度为_minsdkversion为1_android:minsdkversion

可以将文章内容翻译成英文,广告屏蔽软件可能会导致该功能失灵(如失效,请关掉广告屏蔽软件后再试):

I'm studying this Building Simple Chat Client with Parse and I'm using gradle 2.4 to build my project. My build.gradle and AndroidManifest.xml codes are:

build.gradle

 buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.1.3'
    }
 }
 apply plugin: 'com.android.application'
 android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"
 }
 repositories {
    jcenter()
 }
 dependencies {
    compile fileTree(dir: 'libs', include: 'Parse-*.jar')
    compile 'com.parse.bolts:bolts-android:1.+'
 }
 dependencies {
    compile fileTree(dir: 'libs', include: '*.jar')
    compile 'com.android.support:support-v4:21.0.0'
    compile 'com.android.support:appcompat-v7:21.0.0+'    
    compile 'com.squareup.picasso:picasso:2.5.0'
 }

minsdkversion为1_分针端点的周期为转速为角速度为_android:minsdkversion

AndroidManifest.xml

I'm getting the next error:

/home/grados-sanchez/workspace/simplechat/src/main/AndroidManifest.xml:0:0   Error:
uses-sdk:minSdkVersion 1 cannot be smaller than version 7 declared in    library /home/grados-sanchez/workspace/simplechat/build/intermediates/exploded-aar/com.android.support/appcompat-v7/21.0.0/AndroidManifest.xml
Suggestion: use tools:overrideLibrary="android.support.v7.appcompat" to force usage
:processDebugManifest FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 1 cannot be smaller   than version 7 declared in library /home/grados-sanchez/workspace/simplechat/build/intermediates/exploded-aar/com.android.support/appcompat-v7/21.0.0/AndroidManifest.xml
  Suggestion: use tools:overrideLibrary="android.support.v7.appcompat" to force usage
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --    debug option to get more log output.
BUILD FAILED

分针端点的周期为转速为角速度为_minsdkversion为1_android:minsdkversion

Could you help me please

You have to add the minSdkVersion to your build.gradle.

Otherwise, gradle uses the default value = 1.

You are using a library with minSdk=7, then you can't use minSdk=1.

android:minsdkversion_分针端点的周期为转速为角速度为_minsdkversion为1

Also pay attention that gradle overrides the values in the Manifest.

Add something like this:

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"
    defaultConfig {
        minSdkVersion 14  
        targetSdkVersion 22
    }
}

Pay attention to your build.gradle. You have two dependencies blocks. You have to merge these blocks.

分针端点的周期为转速为角速度为_android:minsdkversion_minsdkversion为1

Just add

to your AndroidManifest.xml and it will work. This will enable the Manifest merger to add this also when the API version is older. Don't forget to add the tools namespace at your xml root as shown below.

You can also find more information about this here:

It seem that you have forget to add the following code in build.gradle. add it into build.gradle and try to compile

 defaultConfig {
    applicationId "com.XXX.XXXX"  // your application package 
    multiDexEnabled true
    minSdkVersion 14
    targetSdkVersion 18
    versionCode 99
    versionName "11.1.5.5"
}

文章来源: Manifest merger failed : uses-sdk:minSdkVersion 1 cannot be smaller than version 7


本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/sanxing/article-125185-1.html

    相关阅读
      发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

      热点图片
      拼命载入中...