I cannot implement spotlight library on Android Stuido

39 Views Asked by At

I've decided to create a user guide for a mobile app I'm writing in Java in Android Studio. However, after adding the Spotlight library to the build.gradle file, I'm encountering an error related to class conflicts when I try to run my app.

My build gradle is like this :

plugins {
    id 'com.android.application'
}

android {
    namespace 'com.yasinguzel.workify'
    compileSdk 33
    viewBinding {
        enabled = true
    }

    defaultConfig {
        applicationId "com.yasinguzel.workify"
        minSdk 26
        targetSdk 33
        versionCode 4
        versionName "1.3"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {

        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    buildFeatures {
        viewBinding true
    }
}

dependencies {

    implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
    implementation "androidx.work:work-runtime:2.8.1"
   

    constraints {
        implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") {
            because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib")
        }
        implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0") {
            because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib")
        }
    }

    def room_version = "2.5.2"

    implementation "androidx.room:room-runtime:$room_version"
    annotationProcessor "androidx.room:room-compiler:$room_version"
    // To use Kotlin Symbol Processing (KSP)
    implementation 'com.github.bumptech.glide:glide:4.12.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'

    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.10.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.2'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
    implementation 'com.google.android.gms:play-services-ads:22.4.0'
    implementation 'com.google.android.exoplayer:exoplayer:2.19.1'
    implementation 'com.github.takusemba:spotlight:x.x.x'
}

How do I make the necessary changes in my build.gradle file to fix this error?"

0

There are 0 best solutions below