Error:Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : uses-sdk:minSdkVersion 11 cannot be smaller than version 14 declared in library [com.google.android.gms:play-services:11.0.4] C:\Users\kamal.android\build-cache\a14382872a293855060ea80fddf386831adf48b2\output\AndroidManifest.xml
Suggestion: use tools:overrideLibrary="com.google.android.gms.play_services" to force usage
apply plugin: 'com.android.application'
compileSdkVersion 23
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.carpedeem.bonne"
minSdkVersion 11
targetSdkVersion 23
ndk {
modandroid {
uleName "player_shared"
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.google.android.gms:play-services:+'
compile files('libs/dagger-1.2.2.jar')
compile files('libs/javax.inject-1.jar')
compile files('libs/nineoldandroids-2.4.0.jar')
compile files('libs/PTAdChartboost.jar')
compile files('libs/PTAdRevMob.jar')
compile files('libs/support-v4-19.0.1.jar')
}
All you need to do is to update your minSdkVersion 11 to minSdkVersion 14 in the defaultConfig of your gradle file.
It means that your application must not have minSdkVersion (minimum SDK version) lesser than the minSdkVersion of any of the libraries that you're using - in your case [com.google.android.gms:play-services:11.0.4] library with minimum SDK of 14.
update your gradle file and build project again.
Change the minSdkVersion to 14 in your build.gradle app and upgrade your compileSdkVersion to 7.0 and your buildToolsVersion to 26.0.0.
Related
Today, I upgraded latest Android Studio latest Version and build the project. And the problem is New Android Studio don't let me compile project with SDK 23...
I cannot build with SDK 25 because it is crush on lower SDK version and only work with some upper SDK. Please suggest how could I solve this problem.
Error:The SDK Build Tools revision (23.0.1) is too low for project ':app'. Minimum required is 25.0.0
Here is my gradle code,
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '23.0.1'
defaultConfig {
applicationId "com.app.androidlivetv"
manifestPlaceholders = [manifestApplicationId: "${applicationId}",
onesignal_app_id: "90582504-49da-44c1-8a3c-800ca73877af",
onesignal_google_project_number: "267076126070"]
minSdkVersion 16
targetSdkVersion 20
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
dexOptions {
javaMaxHeapSize "4g"
}
}
}
dependencies {
compile files('libs/picasso-2.4.0.jar')
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'it.neokree:MaterialTabs:0.11'
compile 'com.google.android.gms:play-services:10.2.0'
compile 'com.onesignal:OneSignal:2.+#aar'
compile 'com.devbrackets.android:exomedia:2.5.5'
compile 'com.google.android.exoplayer:exoplayer:r1.5.8'
compile files('libs/YouTubeAndroidPlayerApi.jar')
compile 'com.android.support:multidex:1.0.1'
}
Just change the target sdk to 23 and compile with 25 it shouldn't crash..
You have to set in you gradle
buildToolsVersion "25.0.2"
And you have to upgrade build tools version as well.
Sample that should compile for min version 23 (
android {
compileSdkVersion 23
buildToolsVersion "25.0.2"
defaultConfig {
minSdkVersion 23
targetSdkVersion 23
versionCode 1
versionName "1.0"
I recently changed my mindSdkVersion to 17 and targetSdkVersion to 21, and got lots of errors. I fixed some of them, but I can't fix this one:
Error:(28, 13) Failed to resolve: com.android.support:appcompat-v7:21.0.1
I'm using Android Studio on Mac and I have Android Support repositories.
My build.gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "24.0.3"
defaultConfig {
applicationId "com.swit.sedamaker"
minSdkVersion 17
targetSdkVersion 21
versionCode 2
versionName "1.01"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile 'com.android.support:appcompat-v7:21.0.1'
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'
}
The error occur because 21.0.1 for support libraries doesn't exist.
dependencies{
//it requires compileSdkVersion 21
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.android.support:appcompat-v7:21.0.2'
compile 'com.android.support:appcompat-v7:21.0.0'
}
You're better to match the API version for compileSdkVersion, buildToolsVersion, targetSdkVersion. Try to use the latest SDK
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.3"
defaultConfig {
...
minSdkVersion 17
targetSdkVersion 24
...
}
...
}
dependencies {
compile 'com.android.support:appcompat-v7:24.2.0'
...
}
Of course you can set targetSdkVersion to 21 if you want. targetSdkVersion is used to inform the system that you have test the app against the target version like the documentation said.
android:targetSdkVersion
An integer designating the API Level that the
application targets. If not set, the default value equals that given
to minSdkVersion. This attribute informs the system that you have
tested against the target version and the system should not enable any
compatibility behaviors to maintain your app's forward-compatibility
with the target version. The application is still able to run on older
versions (down to minSdkVersion).
Read more at What is the difference between compileSdkVersion and targetSdkVersion? forcompileSdkVersion and targetSdkVersion.
Try Replace with:
implementation 'com.android.support:appcompat-v7:23.3.0'
How to support Android minimum SDK version 8 for Google play GCM service [com.google.android.gms:play-services-base:8.4.0]. In my application I have set minimum SDK version 8 and targeting version 23 and need Google GCM service to my app, so that I have added corresponding dependencies to the app.
This is gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.mg"
minSdkVersion 8
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile files('libs/achartengine-1.0.0.jar')
compile files('libs/android-async-http-1.4.4.jar')
compile files('libs/httpmime-4.1.jar')
compile project(':sliderlibrary')
}
Got the following error:
Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 8 cannot be smaller than version 9 declared in library [com.google.android.gms:play-services-gcm:8.4.0] /home/node/mg_android_studio/MeterGenius/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-gcm/8.4.0/AndroidManifest.xml
Suggestion: use tools:overrideLibrary="com.google.android.gms.gcm" to force usage
How to get support for minimum version 8?. Please help me.
Follow the suggestion in the error message and add the following to your Manifest:
<uses-sdk tools:overrideLibrary="com.google.android.gms.gcm"/>
Be prepared however that GCM might not work as expected on SDK 8.
Hi everyone I am new to android developing.I download the latest version of android studio 1.3.2 yesterday.But when I start a new project for testing, gradle give me an error.
My gradle is
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.example.niyamat.testing3"
minSdkVersion 15
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.+'
}
The error is
Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 15 cannot be different than version L declared in library [com.android.support:appcompat-v7:21.0.0-rc1] C:\Users\Niyamat\Documents\Testing3\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.0-rc1\AndroidManifest.xml
I know there are some question about the same error but I didn't find any good solution.
So please someone help me?
Whats your Logcat Throws
Manifest merger failed : uses-sdk:minSdkVersion 15 cannot be different than version L declared in library [com.android.support:appcompat-v7:21.0.0-rc1]
What should you Do
Remove minSdkVersion version from Manifest .You already declare it in your build.gradle .
Use this compileSdkVersion 21
buildToolsVersion '21.1.2' instead yours.
Compile compile 'com.android.support:appcompat-v7:21.0.1'
First of all remove this line from your Manifest .
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="22" />
Finally
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.example.niyamat.testing3"
minSdkVersion 15
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.1'
}
It is your issue.
uses-sdk:minSdkVersion 15 cannot be different than version L declared in library [com.android.support:appcompat-v7:21.0.0-rc1]
It is quite strange that you have in your sdk folder the preview version of appcompat 21.
This version was published with the lollipop preview (api-L) and had the minSdk = L. It is the reason of your issue (because you have minSdkVersion 15)
You should not have this folder in your sdk. Check with the SDK Manager if it is updated.
Then you can modify your build.gradle removing the +.
Support libraries v21
compile 'com.android.support:appcompat-v7:21.0.0'
compile 'com.android.support:appcompat-v7:21.0.2'
compile 'com.android.support:appcompat-v7:21.0.3'
Support libraries v22 (require compileSdkVersion 22)
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.android.support:appcompat-v7:22.1.0'
compile 'com.android.support:appcompat-v7:22.1.1'
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:appcompat-v7:22.2.1'
Support libraries v23 (require compileSdkVersion 23)
compile 'com.android.support:appcompat-v7:23.0.0'
compile 'com.android.support:appcompat-v7:23.0.1'
Seems you have a previous version of the app compat into your lib folder specific for android L.
Also you should set the version for compileSdkVersion, buildToolVersion, targetSdkVersion and the appcompat-v7 to be the same.
In your case, the buildToolVersion should be "21.1.2".
Basically, this is the reason why android studio complains / suggests NOT using .+ in your compiles.
compile 'com.android.support:appcompat-v7:21.+'
It forces compile with absolute last version of appcompat 21 which is com.android.support:appcompat-v7:21.0.0-rc1 (as you can see from error you got). That version does not allow minSdkVersion 15 - it's made for Lollipop. Change your compile appcompat to version number that does allow minSdkVersion 15 to solve the issue.
I import an eclipse project into my android studio. The original project's target is android-14, but my studio's mimimum API version is 21. And I don't want to download the API 14, how should solve my problem?
You only must have downloaded the SDK configured as compileSdkVersion. Your SDK configured as minSdkVersion can be a lower version such as API 14.
In the Android Studio the configuration is realized in build.grade file. For example:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "22.0.1"
defaultConfig {
minSdkVersion 14
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile project(":lib")
compile 'com.android.support:appcompat-v7:19.0.1'
compile fileTree(dir: 'libs', include: ['*.jar'])
}
you have to add dependencies in build.gradle to use
defaultConfig {
minSdkVersion 14
targetSdkVersion 21
versionCode 1
versionName "1.0"