Android,Firebase:minSdkVersion 15不能小于版本16 [英] Android, Firebase: minSdkVersion 15 cannot be smaller than version 16
问题描述
我需要将minsdk降级以保持与某些设备的兼容性,因此我需要从minsdk16-> 15降级我的版本.但是我有这个错误:
I need downgrade my minsdk for keep compatibility with some devices, so I need downgrade my version from minsdk16 -> 15. But im having this error:
清单合并失败:uses-sdk:minSdkVersion 15不能更小比库中声明的版本16[com.github.flipagram:android-assetcopier:0.1.1]C:\ Users \ beto_.gradle \ caches \ transforms-1 \ files-1.1 \ android-assetcopier-0.1.1.aar \ 7ee049aa00fd85016b1a1ae60ce050df \ AndroidManifest.xml因为该库可能正在使用15建议中不提供的API:使用兼容的库,其minSdk最多为15,或者增加此项目的minSdk版本至少为16,或使用工具:overrideLibrary ="flipagram.assetcopylib"强制使用(可能导致运行时失败)
Manifest merger failed : uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library [com.github.flipagram:android-assetcopier:0.1.1] C:\Users\beto_.gradle\caches\transforms-1\files-1.1\android-assetcopier-0.1.1.aar\7ee049aa00fd85016b1a1ae60ce050df\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="flipagram.assetcopylib" to force usage (may lead to runtime failures)
这是我当前的build.grandle,但是当我将minsdk更改为16时,得到了之前显示的错误.
This is my current build.grandle, but when i change the minsdk to 16, get the error showed before.
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "my.package.id"
minSdkVersion 15
targetSdkVersion 28
versionCode 510
versionName "5.1.0"
manifestPlaceholders = [manifestApplicationId : "${applicationId}",
onesignal_app_id : "myonesingeid",
onesignal_google_project_number: "myprojectnumber"]
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.12'
implementation 'go.swlib.gojni:swlib:1.0@aar'
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.onesignal:OneSignal:3.+@aar'
implementation 'com.google.android.gms:play-services-gcm:16.0.0'
implementation "com.google.android.gms:play-services-location:16.0.0"
implementation 'com.google.android.gms:play-services-ads:17.1.2'
implementation 'com.github.quentin7b:android-location-tracker:3.2'
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
// implementation 'com.google.firebase:firebase-ads:17.1.2'
implementation 'com.google.firebase:firebase-crash:16.2.1'
implementation 'org.jetbrains:annotations-java5:15.0'
implementation 'com.github.hotchemi:android-rate:1.0.1'
implementation 'com.github.flipagram:android-assetcopier:0.1.1'
}
apply plugin: 'com.google.gms.google-services'
如果我理解得很好,我的错误就在于这种依赖关系:
If im understanding well, my error is on this dependency :
implementation 'com.github.flipagram:android-assetcopier:0.1.1'
希望您能提供帮助!谢谢!
Hope you can help! Thanks!
推荐答案
使用最新版本的Firebase库所需的最低SDK级别为16.除了备份到较旧的版本之外,没有其他解决方法.这些库的版本.
The minimum SDK level required to use the most recently versions of Firebase libraries is 16. There is no workaround to this, other than to back up to a much older version of these libraries.
在文档中指出:
先决条件
正在运行的设备:
- Android 4.1(API级别16,Jelly Bean)或更高版本
- Google Play服务15.0.0或更高版本
这篇关于Android,Firebase:minSdkVersion 15不能小于版本16的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!