Why does my Android build always attempt to download camera-mlkit-vision-1.3.0-rc01.pom etc

331 Views Asked by At

My android builds downloads section shows the multiple attempts are always made to download the following

why does it do this for every build? how do i stop this behaviour?

enter image description here

why does maven repo show 1.3.0-rc01 as a managed dep for camera2?

enter image description here

UPDATE

executing the gradlew dependencies command gives this output

|    +--- androidx.camera:camera-camera2:1.3.0-rc01
|    |    +--- androidx.annotation:annotation:1.2.0 -> 1.6.0 (*)
|    |    +--- androidx.camera:camera-core:1.3.0-rc01
|    |    |    +--- androidx.annotation:annotation:1.2.0 -> 1.6.0 (*)
|    |    |    +--- androidx.annotation:annotation-experimental:1.1.0 -> 1.3.0 (*)
|    |    |    +--- androidx.core:core:1.1.0 -> 1.10.1 (*)
|    |    |    +--- androidx.lifecycle:lifecycle-livedata:2.1.0 -> 2.6.1 (*)
|    |    |    +--- com.google.guava:listenablefuture:1.0 -> 9999.0-empty-to-avoid-conflict-with-guava
|    |    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.0 (*)
|    |    |    +--- androidx.camera:camera-camera2:1.3.0-rc01 (c)
|    |    |    +--- androidx.camera:camera-extensions:1.3.0-rc01 (c)
|    |    |    +--- androidx.camera:camera-lifecycle:1.3.0-rc01 (c)
|    |    |    +--- androidx.camera:camera-mlkit-vision:1.3.0-rc01 -> 1.3.0-beta02 (c)
|    |    |    +--- androidx.camera:camera-video:1.3.0-rc01 (c)
|    |    |    \--- androidx.camera:camera-view:1.3.0-rc01 (c)
|    |    +--- androidx.camera:camera-core:1.3.0-rc01 (c)
|    |    +--- androidx.camera:camera-extensions:1.3.0-rc01 (c)
|    |    +--- androidx.camera:camera-lifecycle:1.3.0-rc01 (c)
|    |    +--- androidx.camera:camera-mlkit-vision:1.3.0-rc01 -> 1.3.0-beta02 (c)
|    |    +--- androidx.camera:camera-view:1.3.0-rc01 (c)
|    |    \--- androidx.camera:camera-video:1.3.0-rc01 (c)
|    +--- androidx.camera:camera-lifecycle:1.3.0-rc01
|    |    +--- androidx.camera:camera-core:1.3.0-rc01 (*)
|    |    +--- androidx.lifecycle:lifecycle-common:2.1.0 -> 2.6.1 (*)
|    |    +--- com.google.guava:listenablefuture:1.0 -> 9999.0-empty-to-avoid-conflict-with-guava
|    |    +--- androidx.camera:camera-camera2:1.3.0-rc01 (c)
|    |    +--- androidx.camera:camera-core:1.3.0-rc01 (c)
|    |    +--- androidx.camera:camera-extensions:1.3.0-rc01 (c)
|    |    +--- androidx.camera:camera-mlkit-vision:1.3.0-rc01 -> 1.3.0-beta02 (c)
|    |    +--- androidx.camera:camera-view:1.3.0-rc01 (c)
|    |    \--- androidx.camera:camera-video:1.3.0-rc01 (c)
|    +--- androidx.camera:camera-view:1.3.0-rc01
|    |    +--- androidx.annotation:annotation:1.2.0 -> 1.6.0 (*)
|    |    +--- androidx.camera:camera-core:1.3.0-rc01 (*)
|    |    +--- androidx.camera:camera-video:1.3.0-rc01
|    |    |    +--- androidx.annotation:annotation:1.2.0 -> 1.6.0 (*)
|    |    |    +--- androidx.camera:camera-core:1.3.0-rc01 (*)
|    |    |    +--- androidx.camera:camera-camera2:1.3.0-rc01 (c)
|    |    |    +--- androidx.camera:camera-core:1.3.0-rc01 (c)
|    |    |    +--- androidx.camera:camera-extensions:1.3.0-rc01 (c)
|    |    |    +--- androidx.camera:camera-lifecycle:1.3.0-rc01 (c)
|    |    |    +--- androidx.camera:camera-mlkit-vision:1.3.0-rc01 -> 1.3.0-beta02 (c)
|    |    |    \--- androidx.camera:camera-view:1.3.0-rc01 (c)

Im not sure what this means...

+--- androidx.camera:camera-mlkit-vision:1.3.0-rc01 -> 1.3.0-beta02 (c)

How do i stop my build trying to use a non existent version of camera-mlkit-vision

3

There are 3 best solutions below

3
Gergely Kőrössy On

There is no 1.3.0-rc01 version of that artifact, which you can tell from the "Failed" status messages.

There are multiple places where you can check it:

  1. The CameraX lib page: enter image description here

  2. The Google Maven camera repo: as you can see, the latest available version is 1.3.0-beta02.

Changing your dependency version to 1.3.0-beta02 for the camera-mlkit-vision will make Gradle download the correct artifact once.

0
Sven Jacobs On

I had the same problem after updating to CameraX 1.3.0. Although I explicitly use version 1.3.0-beta02 of camera-mlkit-vision, Gradle tries to download the nonexistent version 1.3.0. My gradle/libs.versions.toml looks like this:

[versions]
androidx-camerax = "1.3.0"

[libraries]
androidx-camera-camera2 = { module = "androidx.camera:camera-camera2", version.ref = "androidx-camerax" }
androidx-camera-lifecycle = { module = "androidx.camera:camera-lifecycle", version.ref = "androidx-camerax" }
androidx-camera-view = { module = "androidx.camera:camera-view", version.ref = "androidx-camerax" }
androidx-camera-mlkit-vision = "androidx.camera:camera-mlkit-vision:1.3.0-beta02"

I added the following snippet to the root build.gradle.kts to fix this:

allprojects {
    configurations.all {
        resolutionStrategy {
            force(libs.androidx.camera.mlkit.vision)
        }
    }
}
0
tobi512 On

Google is working to release v1.3.1 with the coming December release since they forgot it with v1.3.0 according to https://issuetracker.google.com/issues/312677260