I'm developing an app that will run from version 2.3 of Android (GingerBread - API Level 9) . However, when trying to add Firebase and Google Admob dependencies, the following error occurred while trying to sync:
This support library should not use a different version (25) than the compilesdkversion (18)" na linha compile 'com.android.support:appcompat-v7:25.2.0'
When you change compile 'com.android.support:appcompat-v7:25.2.0'
by compile 'com.android.support:appcompat-v7:18.0.0'
Error:Execution failed for task ':app:processDebugManifest'. Manifest merger failed : uses-sdk:minSdkVersion 9 cannot be smaller than version 14 declared in library [com.google.android.gms:play-services-ads:10.2.4] C:\Users\leand\.android\build-cache\e914e1341a896ecd664487a87a8e07281927ee66\output\AndroidManifest.xml Suggestion: use tools:overrideLibrary="com.google.android.gms.ads.impl" to force usage
I added <uses-sdk tools:overrideLibrary="com.google.android.gms.all"/>
to AndroidManifest as suggested by the error itself, but the same message keeps popping up when trying to sync.
Build.grade (Module: app):
apply plugin: 'com.android.application'
android {
compileSdkVersion 18
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.black.flash"
minSdkVersion 9
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:18.0.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services-ads:10.2.4'
}
apply plugin: 'com.google.gms.google-services'