netdraftbd netdraftbd - 1 month ago 15
Android Question

Android studio error rise :app:processDebugManifest while play-services-ads:8.1.0 added on build gradle

Hi I am developing an android application. Most the functionality already implemented and working fine. Now I trying to integrate add to google AdMob ads.

But while I add google add services on dependencies section of build.gradle file my application stopped working with error:

Execution failed for task ':app:processDebugManifest'.


My build.gradle file configuration as follow:

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig {
applicationId "com.coder.reports"
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.0'
compile 'com.android.support:design:23.1.0'
compile 'com.google.android.gms:play-services-ads:8.1.0'
}


Please let know me what I exactly missing or what's wrong with my config file?

Answer

Solution of your error:

In your build.gradle you have used play-services-ads version is 8.1.0 and minSdkVersion is 8 which is smaller then that 8.1.0 that's why you are getting error.

Based on your case you can not set minSdkVersion smaller then 9. Just update your default section as follow and then sync hopefully your issue will be resolved

defaultConfig {
    applicationId "com.coder.reports"
    minSdkVersion 9
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
}