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

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'

I had this problem and solved it by adding:
lintOptions {
checkReleaseBuilds false
}
to my build.gradle file within the android{ } section.

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

Related

A problem occurred configuring project ':app'. after running an old project

I am trying to run an old project on Android Studio, it used to work fine but now trying to run again without making any changes. I have tried many things but had no success and getting this error. Any help will be appreciated
A problem occurred configuring project ':app'.
I've updated the Gradle version but not sure where it's failing now.
Here is the gravel file.
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 30
defaultConfig {
applicationId "com.name"
minSdkVersion 30
targetSdkVersion 30
versionCode 3
versionName "3.0"
multiDexEnabled true
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 "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.firebase:firebase-messaging:15.0.2'
implementation 'com.google.firebase:firebase-database:15.0.0'
implementation 'com.google.firebase:firebase-auth:15.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.google.firebase:firebase-core:15.0.2'
// implementation 'com.google.android.gms:play-services-ads:12.0.0'
implementation 'com.squareup.picasso:picasso:2.71828'
//implementation 'org.jetbrains.anko:anko-sdk15:0.8.2'
//implementation 'com.beust:klaxon:0.30'
}
apply plugin: 'com.google.gms.google-services'
If this project can run normally in the past, generally only need File -> Invalidate Caches

A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution installing Glide in android studio

I'm reading a documents regarding the new glide on how to install on my app, Its quite difficult now since they update the new api and document unlike before and following there instruction, but why I'm getting this error:
A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
I tried already so many ways to debug it. but my issue was not still resolve.
Here is my build.grade:app:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'realm-android'
android {
compileSdkVersion 30
buildToolsVersion "30.0.1"
defaultConfig {
applicationId "com.example.app1"
minSdkVersion 16
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.1'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.google.android.material:material:1.2.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.android.volley:volley:1.1.1'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.2.0"
implementation 'com.google.code.gson:gson:2.8.6'
implementation("com.squareup.okhttp3:okhttp:4.8.1")
kapt 'com.github.bumptech.glide:compiler:4.11.0'
}
It seems you have forgot to add dependancy
try this
dependencies {
implementation 'com.github.bumptech.glide:glide:4.11.0'
kapt 'com.github.bumptech.glide:compiler:4.11.0'
}
also add in your this inside of your project level build.gradle file:
repositories {
google()
jcenter()
}

Android Studio 3.4: Changing the value for a property with a final value has been deprecated. This will fail with an error in Gradle 6.0

I get the following warning in the Build Output console of Android Studio 3.4:
Task :app:processDebugResources
Changing the value for a property with a final value has been deprecated. This will fail with an error in Gradle 6.0.
Here's my build.gradle(Module:app) file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.xscoder.myapp"
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// Enabling multidex support.
multiDexEnabled true
aaptOptions { cruncherEnabled = false }
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions { javaMaxHeapSize "4g" }
}
repositories {
google()
mavenCentral()
jcenter()
maven { url 'https://jitpack.io' }
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:27.1.1'
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'
testImplementation 'junit:junit:4.12'
// Parse
implementation "com.github.parse-community.Parse-SDK-Android:parse:1.18.6"
implementation "com.github.parse-community.Parse-SDK-Android:fcm:1.18.6"
implementation 'com.parse.bolts:bolts-android:1.4.0'
// CircleImageView
implementation 'de.hdodenhof:circleimageview:3.0.0'
// Facebook
implementation 'com.facebook.android:facebook-android-sdk:4.37.0'
implementation 'com.parse:parsefacebookutils-v4-android:1.10.7#aar'
// Google & Firebase
implementation 'com.google.android.gms:play-services-ads:17.2.0'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.firebase:firebase-core:16.0.8'
implementation 'com.google.firebase:firebase-messaging:17.6.0'
}
apply plugin: 'com.google.gms.google-services'
Everything is fine, the app runs smoothly, but what I'm wondering is when Gradle 6.0 will be available, so what may cause that task deprecation?
Try to Run this may this will help
./gradlew clean
rm -rf ~/.gradle/caches/*

Failed to resolve: androidx.lifecycle:lifecycle-viewmodel-ktx:1.1.1

I'm trying to use the new Navigation Architecture Component for android and I'm getting the error
Failed to resolve: androidx.lifecycle:lifecycle-viewmodel-ktx:1.1.1
when I'm defining the lifecycle_version to "1.1.1"
I'm basically just copying and pasting what is in the documentation so I'm running out of ideas of what is wrong in here :(
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.mobile.codgin.newnavigation"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
def lifecycle_version = "1.1.1"
// ViewModel and LiveData
implementation "android.arch.lifecycle:extensions:$lifecycle_version"
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
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'
}
try replace
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
with this
//https://mvnrepository.com/artifact/androidx.lifecycle/lifecycle-viewmodel-ktx
implementation group: 'androidx.lifecycle', name:'lifecycle-viewmodel-ktx', version: '2.0.0-alpha1'
then sync again.
You can have a look here :
https://mvnrepository.com/artifact/androidx.lifecycle/lifecycle-viewmodel-ktx/2.0.0-alpha1
it seems to be that the repository was emptied somehow. Hence, you can not download it from the repository.
When it shows you this error add this code to section build.gradle
configurations {
all {
exclude group: 'androidx.lifecycle', module: 'lifecycle-viewmodel-ktx'
}
}

Error in using ArthurHub image crop library with kotlin

I am using ArthurHub image crop library in my project. but this error occurs
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
i have tried many solutions that were provided in other questions, but none of them works for me.
my build.gradle(module) file is here
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.lenovo.chatapp"
minSdkVersion 19
targetSdkVersion 26
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:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.firebase:firebase-auth:12.0.0'
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.google.firebase:firebase-database:12.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.+'
implementation 'com.google.firebase:firebase-core:12.0.0'
}
repositories {
mavenCentral()
}
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.google.gms.google-services'

Categories

Resources