安卓,火力地堡 : minSdkVersion 15 cannot be smaller than version 16

标签 android firebase

我需要降级我的 minsdk 以保持与某些设备的兼容性,所以我需要将我的版本从 minsdk16 -> 15 降级。 但是我有这个错误:

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 时,出现之前显示的错误。

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'

如果我理解得很好,我的错误就在于这个依赖:

implementation 'com.github.flipagram:android-assetcopier:0.1.1'

希望对您有所帮助! 谢谢!

最佳答案

使用最新版本的 Firebase 库所需的最低 SDK 级别是 16。没有解决方法,只能备份到这些库的更旧版本。

documentation它指出:

Prerequisites

A device running:

  • Android 4.1 (API level 16, Jelly Bean) or later
  • Google Play services 15.0.0 or later

关于安卓,火力地堡 : minSdkVersion 15 cannot be smaller than version 16,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55030849/

相关文章:

java - 重新启动 MediaPlayer 时出现噪音

java - 当提供者是 gps 时返回的位置为空?

android - 月 View 最佳实现

seo - Firebase 为 SPA 托管 SEO

android - 如何快速自动发送FCM或APNS消息?

ios - Firebase 和谷歌标签管理器 : <FIRAnalytics/WARNING> Attempted to log nil event

android - Android 2.3(GB) 中的辅助功能服务无法识别辅助功能事件

android - 将 TextView 直接放在 XML 上的 Imageview 之上

java - 如何在 Android Studio 中使用 Firebase 自动登录?

swift - Firestore timestamp date range query with order by 生成错误