Adnan Attar
Adnan Attar

Reputation: 357

Getting An Error : Execution failed for task ':app:lintVitalRelease'

Why is this Error Getting me While Generating a Signed Apk in Kotlin? Anyone who knows the solution please send an answer.

Logcat Error:

Execution failed for task ':app:lintVitalRelease'.
Lint found fatal errors while assembling a release target.

I'm adding build.gradle file. I don't know what's wrong with my code, So please anyone know solution please answer. Build.gradle

apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

apply plugin: 'kotlin-kapt'

android {
    compileSdkVersion 29
    defaultConfig {
        applicationId "com.testing.app"
        minSdkVersion 21
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:design:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.android.support:support-v4:27.1.1'
    testImplementation 'junit:junit:4.12'
    implementation "android.arch.persistence.room:runtime:1.1.1"
    kapt "android.arch.persistence.room:compiler:1.1.1"
    implementation "android.arch.lifecycle:livedata:1.1.1"
    kapt "android.arch.lifecycle:compiler:1.1.1"
    implementation 'com.karumi:dexter:5.0.0'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation "org.jetbrains.anko:anko:$anko_version"

    //Anko Commons

    implementation "org.jetbrains.anko:anko-commons:$anko_version"
    implementation "org.jetbrains.anko:anko-appcompat-v7-commons:$anko_version"
    implementation 'com.android.support:recyclerview-v7:27.1.1'
    implementation 'com.android.support:cardview-v7:27.1.1'
    implementation 'com.github.medyo:android-about-page:1.2.2'
    implementation 'com.google.firebase:firebase-ml-vision-image-label-model:17.0.2'
    implementation "com.google.firebase:firebase-ml-model-interpreter:17.0.3"
    implementation "com.google.firebase:firebase-ml-vision:19.0.2"
    implementation 'com.google.firebase:firebase-core:16.0.7'
    implementation 'com.google.firebase:firebase-crash:16.2.1'


}

apply plugin: 'com.google.gms.google-services'

Upvotes: 4

Views: 8681

Answers (4)

PatricioSantibanez
PatricioSantibanez

Reputation: 13

MacOS M2 chip.

Project made with react native.

Solution:

  <lintoptions
      abortOnError="false"
      absolute paths = "true"
      checkReleaseBuilds="false"
      explainIssues="true"/>

Upvotes: 0

yousef Abbdolzadeh
yousef Abbdolzadeh

Reputation: 421

lintOptions is deprecated

Use

   lint {
    checkReleaseBuilds = false
}

in Kotlin DSL (build.gradle.kts) mode

Upvotes: 2

Raihan Mahamud
Raihan Mahamud

Reputation: 63

    lintOptions {
        checkReleaseBuilds false
        // Or, if you prefer, you can continue to check for errors in release builds,
        // but continue the build even when errors are found:
        abortOnError false
    }
}

Upvotes: 1

Adnan Attar
Adnan Attar

Reputation: 357

I had this problem and solved it by adding:

lintOptions { 

    checkReleaseBuilds false

}

to my build.gradle file within the android{ } section.

Upvotes: 18

Related Questions