Just added a new dependency screen_protector: 1.1.1 to my flutter project and it fails only on android with the following message:

Execution failed for task ':app:checkRefzDebugAarMetadata'.
> Could not resolve all files for configuration ':app:refzDebugRuntimeClasspath'.
   > Could not find com.github.prongbang:screen-protector:1.0.0.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/github/prongbang/screen-protector/1.0.0/screen-protector-1.0.0.pom
       - https://repo.maven.apache.org/maven2/com/github/prongbang/screen-protector/1.0.0/screen-protector-1.0.0.pom
       - https://storage.googleapis.com/download.flutter.io/com/github/prongbang/screen-protector/1.0.0/screen-protector-1.0.0.pom
       - https://jcenter.bintray.com/com/github/prongbang/screen-protector/1.0.0/screen-protector-1.0.0.pom
     Required by:
         project :app > project :screen_protector

  1. How can it happen, that a package listed on pub.dev is not present in the regarding repos? Has anyone ever experienced something like that?
  2. Why is the explicitly set package version 1.1.1 but 1.0.0 used in the repo links from the error message?

Might there be a connection between both points?

Thanks a lot for any help!!

Solution 1: Cameron

I resolved this issue by adding maven { url 'https://jitpack.io/' } to android/build.gradle.

But had to add it to allProjects as such:

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

I also had to update the minSdkVersion in android/app/build.gradle to 21.