II can't add SearchableSpinner

Viewed 20

enter image description hereI can't add SearchableSpinner in my project, Although i am adding the dependency in the gradle file

am I adding something incorrect?

build.gradle (app)

plugins {
    id 'com.android.application'
    id 'org.jetbrains.kotlin.android'
    id 'androidx.navigation.safeargs.kotlin'
    id 'com.google.gms.google-services'
    id 'com.google.firebase.crashlytics'
    id 'kotlin-parcelize'
    id 'kotlin-kapt'
}

android {
    compileSdk 32

    defaultConfig {
        applicationId "tn.mobile.level_up_academy"
        minSdk 26
        targetSdk 32
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes  {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            buildConfigField "String", "SERVER_URL", '"https://level-up-api.herokuapp.com/"'
        }
        debug {
            buildConfigField "String", "SERVER_URL", '"https://level-up-api.herokuapp.com/"'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
    dataBinding {
        enabled = true
    }
    kotlinOptions{
        freeCompilerArgs += [
                "-Xjvm-default=all",
        ]
    }
}
dependencies {
    ...
    implementation"com.toptoche.searchablespinner:searchablespinnerlibrary:$searchableSpinnerVersion"

}

build.gradle project

buildscript {
    ext {

        // App dependencies
        ...
        searchableSpinnerVersion = "1.3.0"
    }

    dependencies {
        classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
        classpath "com.google.gms:google-services:$googleServiceVersion"
        classpath "com.google.firebase:firebase-crashlytics-gradle:$crashlyticsVersion"
    }
}
plugins {
    id 'com.android.application' version '7.1.2' apply false
    id 'com.android.library' version '7.1.2' apply false
    id 'org.jetbrains.kotlin.android' version '1.6.20' apply false
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Here are the codes in the build gradle. The implementation"com.toptoche.searchablespinner:searchablespinnerlibrary:$searchableSpinnerVersion" library at the bottom is the library I'm trying to use and getting the error. the error message

Class referenced in the layout file, `com.toptoche.searchablespinnerlibrary.SearchableSpinner`, was not found in the project or the libraries
0 Answers
Related