我正在关注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)
下面是我的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'
}
答案 0 :(得分:0)
如果您想支持SDK版本15并且也要使用此库,请执行此操作
在您的
AndroidManifest.xml
文件中添加<uses-sdk tools:overrideLibrary="me.riddhimanadib.library" /> <!--you need to add 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>
答案 1 :(得分:0)
将minSdkVersion更改为16,您的问题将得到解决。
TreeNode
答案 2 :(得分:0)
uses-sdk:minSdkVersion 15不能小于声明的版本16 在图书馆
因为您应该将minSdkVersion
更改为16
:
defaultConfig {
applicationId "yodgobekkomilov.edgar.com.worldnews"
minSdkVersion 16
...
..
没有人提到不同版本的支持库,因此我添加了对正确依赖项的答案。在build.gradle
中,为以下依赖项使用相同的版本:
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'
...
..