I am getting following Execution failed for task ':app:processDebugManifest'
.
Manifest merger failed : uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library [me.riddhimanadib.bottom-nav-bar:bottom-nav-bar:1.0.0] C:\Users\admin\.gradle\caches\transforms-1\files-1.1\bottom-nav-bar-1.0.0.aar\6ccf719b3589ca01ca26fd0f5b0fe6cc\AndroidManifest.xml as the library might be using APIs not available in 15
Suggestion: use a compatible library with a minSdk of at most 15,
or increase this project's minSdk version to at least 16,
or use tools:overrideLibrary="me.riddhimanadib.library" to force usage (may lead to runtime failures)
Below is my app.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "yodgobekkomilov.edgar.com.worldnews"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0-rc02'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'io.reactivex.rxjava2:rxjava:2.1.9'
implementation 'io.reactivex:rxjava-math:1.0.0'
implementation 'io.reactivex.rxjava2:rxjava:2.1.9'
// RxAndroid
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation 'com.squareup.retrofit2:retrofit:2.0.0'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.squareup.retrofit2:converter-gson:2.0.0'
implementation "com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0"
implementation "com.squareup.okhttp3:okhttp:3.0.1"
implementation "com.squareup.okhttp3:okhttp-urlconnection:3.0.1"
implementation "com.squareup.okhttp3:logging-interceptor:3.4.1"
implementation 'com.android.support:cardview-v7:28.0.0-alpha3'
implementation 'com.android.support:recyclerview-v7:28.0.0-alpha3'
implementation 'com.android.support:design:28.0.0'
implementation 'me.riddhimanadib.bottom-nav-bar:bottom-nav-bar:1.0.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
}
If you want to support SDK version 15 and want to use this library too , then do this
Inside your
AndroidManifest.xml
file add this<uses-sdk tools:overrideLibrary="me.riddhimanadib.library" /> <!--you need to add this-->
your manifest will look like this -
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-sdk tools:overrideLibrary="me.riddhimanadib.library" /> <!--you need to add this-->
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name=".YOUR_APPLICATION"
android:icon="@mipmap/ic_launcher">
<activity android:name=".activity"></activity>
</application>
</manifest>
Change minSdkVersion to 16 and your issue will be solved.
defaultConfig {
applicationId "yodgobekkomilov.edgar.com.worldnews"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library
Since you should change the minSdkVersion
to 16
:
defaultConfig {
applicationId "yodgobekkomilov.edgar.com.worldnews"
minSdkVersion 16
...
..
No one mentioned about different versions of support libraries so I add an answer for the right dependencies. In build.gradle
, use same version for below dependencies:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
...
..
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.