'sentry android install error Failed to resolve: androidx.lifecycle:lifecycle-common-java8:2.4.0

i want to add sentry 5.6.0 to my android project but always give error on gradle build

buildscript {
    repositories {
        mavenCentral()
    }
}

plugins {
    id 'com.android.application'
    id 'org.jetbrains.kotlin.android'
    id "io.sentry.android.gradle" version "3.0.0"
}
apply plugin: 'io.sentry.android.gradle'
dependencies {
    ...
    implementation 'io.sentry:sentry-android:5.6.0'
}

i have two build.gradle and other file has below lines

pluginManagement {
    repositories {
        gradlePluginPortal()
        google()
        mavenCentral()
    }
}
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven { url "https://jitpack.io" }
        maven { url 'https://github.com/akapelrud/Rotary-Seekbar/raw/master/RotaryKnob/snapshots' }
    }
}

this is part of my gradle.build file and using kotlin and minSdk 19 tagetSdk 32



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source