清单合并失败:用途:Minsdkversion 15不能小于库中声明的版本16 [com.google.firebase



包括实现'com.google.google.firebase:firebase-core:17.0.0'在我的build.gradle(app(中,我的项目无法成功同步。正如错误所暗示的那样,我已经尝试清理我尝试过的项目,将Minsdkversion增加到16(它给出了另一个错误(,但没有任何可行。

build.gradle(app(

    android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.example.saad.error"
        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'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.google.firebase:firebase-core:17.0.0'
    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'
}
apply plugin: 'com.google.gms.google-services'

清单文件

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.saad.error">
    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>

我刚刚开始在Android上开发,并遇到了同样的错误。我将minSdkVersion从15更改为16,然后构建并运行。

我不是专家,但我刚刚遇到了同样的问题,然后以Android模式右键单击Android模式,然后输入'Open Module设置'。默认配置'我将Minsdk设置为我已安装的版本

遇到了同样的问题,只需通过将项目迁移到Androidx来解决它单击"重构"选项卡 ->迁移到Androidx->只需给出一个备份目录 ->再次单击重构器希望这将清除相同的

相关内容

最新更新