Search code examples
fluttergradle

Could not find com.github.nabinbhandari:Android-Permissions:3.8


i’m encountering an issue while trying to build my Android project using Gradle. The build fails with the following error:

Could not find com.nabinbhandari.android:permissions:3.8. Searched in the following locations: - https://storage.googleapis.com/download.flutter.io/com/nabinbhandari/android/permissions/3.8/permissions-3.8.pom - https://dl.google.com/dl/android/maven2/com/nabinbhandari/android/permissions/3.8/permissions-3.8.pom - https://repo.maven.apache.org/maven2/com/nabinbhandari/android/permissions/3.8/permissions-3.8.pom - https://jcenter.bintray.com/com/nabinbhandari/android/permissions/3.8/permissions-3.8.pom Required by: project :app > project :flutter_storage_path

Images

What I tried:

Cleaned the Gradle project using ./gradlew clean in the terminal. Rebuilt the project using ./gradlew build in the terminal. What I expected: I expected that cleaning and rebuilding the Gradle project would resolve any dependency issues and allow the project to build successfully without errors.

What actually resulted: The build still failed with errors indicating that Gradle could not find the dependencies com.github.nabinbhandari:Android-Permissions:3.7 and com.nabinbhandari.android:permissions:3.8 in the specified repositories.

https://github.com/nabinbhandari/Android-Permissions


Solution

  • A forked version dependency from jitpack is working:

    maven {
                url 'https://jitpack.io'
          }
    

    thus replace the dependency:

       implementation 'com.nabinbhandari.android:permissions:3.8'
    

    with

    implementation 'com.github.Redman1037:Android-Permissions:3.8'
    

    Visit the fork page.