Search code examples
kotlinandroid-download-manager

PRDownloader not working even after implementing library. Unknown Reference for: PRDownloader in Android Studio


I implemented the PRDownloader in my gradle.

implementation 'com.mindorks.android:prdownloader:0.6.0'

But when I type PRDownloader in my adapter class it gives me the error "Unknown Reference for: PRDownloader". It's the only error Android Studio gives me. I use mavenCentral() instead of jcenter. Maybe this could be causing some problems.


Solution

  • There isn't version 0.6.0, the latest one's 0.5.0.

    Fix your code line to:

    implementation 'com.mindorks.android:prdownloader:0.5.0'
    

    Also on the following Gradle script build.gradle(Project: YOURPROJECTNAME) the jcenter() repository in repositories statement:

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

    Warning: jcenter() repository's already deprecated for Android development. The most ideal solution would be to look for some other similar library that offers support to mavenCentral() over one for avoiding deprecated repositories on your projects.

    Reference:

    1. https://mvnrepository.com/artifact/com.mindorks.android/prdownloader?repo=jcenter

    2. JCenter deprecation; impact on Gradle and Android