javaandroidjcenter

EditSpinner for Android App. How to Fix or Replace a Missing Library After Android Studio Update?


I really need help. I have a small app project that uses the EditSpinner library from GitHub, and it's a crucial component for me. A couple of days ago, due to an Android Studio update, my entire project broke. I barely managed to piece it back together, but now I can't access this library. Without it, nothing works. Could you please advise on how to fix this or suggest an alternative? Is it possible to directly integrate the downloaded source code into my project without using the repository?

repositories {
    mavenCentral()
    google()
    jcenter()
}


dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation 'androidx.appcompat:appcompat:1.3.1'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'org.jetbrains:annotations:15.0'
    implementation 'com.google.code.gson:gson:2.8.8'
    implementation 'com.google.android.gms:play-services-maps:17.0.0'

    implementation "com.reginald:editspinner:1.1.0"


    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

}
Failed to resolve: com.reginald:editspinner:1.1.0
Show in Project Structure dialog
Affected Modules: app

I tried everything I could find on the internet, but there's very little information specifically about this component.


Solution

  • I fixed it by removing the dependency from build.gradle and including 2 source files directly from the repository: https://github.com/xyxyLiu/Edit-Spinner

    The source files I copied were

    Some minor changes were required with EditSpinner.java: