Manifest Merger Failed : Uses-sdk:minsdkversion 1 Cannot Be Smaller Than Version 7
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
Solution 1:
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.
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.
Solution 2:
Just add
<uses-sdktools:overrideLibrary="android.support.v7.appcompat"/>
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.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"package="com.example.app"
xmlns:tools="http://schemas.android.com/tools">
You can also find more information about this here.
Solution 3:
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"
}
Post a Comment for "Manifest Merger Failed : Uses-sdk:minsdkversion 1 Cannot Be Smaller Than Version 7"