saad
saad

Reputation: 61

Manifest merger failed : uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library [com.google.firebase:firebase-iid:19.0.0]

On including implementation 'com.google.firebase:firebase-core:17.0.0' in my build.gradle(app) my project does not successfully sync. i've tried cleaning up the project i've tried ,as the error suggests, increasing minSdkVersion to 16 (it gives another error) but nothing worked.

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 file

<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>

Upvotes: 2

Views: 5785

Answers (3)

aghas ofa
aghas ofa

Reputation: 21

I just started developing on Android and got that same error. I changed my minSdkVersion from 15 to 16, and then it built and ran.

Upvotes: 2

Safaf Mohammed
Safaf Mohammed

Reputation: 21

Got the same problem just fix it by migrating the project to androidx Click on the Refactor tab->Migrate to androidx->Just give a backup directory->click again Refactor Hope this will clear the same

Upvotes: 0

joash
joash

Reputation: 9

I'm not an expert but I had the same problem just now and I went to the app folder in android mode right-clicked it and entered 'open module settings'.In the 'default config' I set the minSDK to the versions I have installed

Upvotes: 0

Related Questions