[英]I am getting What went wrong: Execution failed for task ':app:generateDebugBuildConfig'. >\AndroidManifest.xml
I am getting following Execution failed for task ':app:processDebugManifest'
. 我正在
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: 以下是我的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 如果要支持SDK版本15并且也要使用此库,请执行此操作
Inside your
AndroidManifest.xml
file add this在您的
AndroidManifest.xml
文件中添加此内容<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. 将minSdkVersion更改为16,您的问题将得到解决。
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
use-sdk:minSdkVersion 15不能小于库中声明的版本16
Since you should change the minSdkVersion
to 16
: 由于您应该将
minSdkVersion
更改为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: 在
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'
...
..
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.