Could not resolve dependency

588 views
Skip to first unread message
Assigned to xi...@google.com by wuj...@google.com

re.le...@gmail.com

unread,
Jun 17, 2021, 4:49:22 AM6/17/21
to Android CameraX Discussion Group
Hello!

I am using version 1.1.0-alpha05

I have an issue with dependency androidx.camera:camera-core:[1.0.0-rc05]. 

This dependency is apparently needed by camera-view 1.0.0-alpha25. It is declared in pom. Build fails on "Could not resolve androidx.camera:camera-core:[1.0.0-rc05]."

The thing is I can build my Camera module. But I have other module that utilizes Camera module that needs this CameraX dependencies(mostly because I send ImageProxy to this host module) and when built from this second module I get this error. 

As bonus I am also using mavenLocal() in build gradle of project and also have all dependencies in .m2 folder and it also did not help.

Xi Zhang

unread,
Jun 17, 2021, 12:25:09 PM6/17/21
to Android CameraX Discussion Group, re.le...@gmail.com
Do your other modules also depend on  `androidx.camera:camera-core:[1.0.0-rc05]`?

Meng Hong

unread,
Jun 18, 2021, 2:02:17 AM6/18/21
to Xi Zhang, Android CameraX Discussion Group, re.le...@gmail.com
--
You received this message because you are subscribed to the Google Groups "Android CameraX Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camerax-develop...@android.com.
To view this discussion on the web visit https://groups.google.com/a/android.com/d/msgid/camerax-developers/093f93b9-3d89-420a-8f32-ee722f39ed91n%40android.com.

re.le...@gmail.com

unread,
Jun 18, 2021, 10:20:54 AM6/18/21
to Android CameraX Discussion Group, mengho...@gmail.com, Android CameraX Discussion Group, re.le...@gmail.com, Xi Zhang
Hello,

In both modules I have declared same dependency. There should not be any direct dependency on 1.0.0-rc05 See below what I have:

def camerax_version = "1.1.0-alpha05"
implementation "androidx.camera:camera-core:${camerax_version}"
implementation("androidx.camera:camera-camera2:${camerax_version}")
implementation("androidx.camera:camera-view:1.0.0-alpha25")
implementation("androidx.camera:camera-lifecycle:${camerax_version}")

Xi Zhang (张熹)

unread,
Jun 18, 2021, 11:49:52 AM6/18/21
to re.le...@gmail.com, Android CameraX Discussion Group, mengho...@gmail.com
In your camera module, could you do:

api("androidx.camera:camera-core:${camerax_version}")

instead, so that your calling module no longer needs that dependency?

re.le...@gmail.com

unread,
Jun 23, 2021, 3:48:30 AM6/23/21
to Android CameraX Discussion Group, Xi Zhang, Android CameraX Discussion Group, mengho...@gmail.com, re.le...@gmail.com
Hi, 
Thanks for the response,

I only now got a chance to try this out. This works great as I don't need to declare CameraX dependency in host module, but now Camera module throws this error when build from host module. 

Also I deleted all camera contents from .gradle\caches\modules-2\files-2.1\androidx.camera. As I have .m2 dependencies nothing should be downloaded in cache? 
However .gradle\caches\modules-2\files-2.1\androidx.camera\camera-core\1.0.0-rc05 is downloaded nonetheless even though I have it downloaded in .m2. Also this downloaded cache has only .pom inside. 

Weirdly, currently only way of building it is by starting our artifactory, but this artifactory has noting with any CameraX dependency.

Don't know if this additional info can be of any help.

Xi Zhang (张熹)

unread,
Jun 23, 2021, 1:35:44 PM6/23/21
to re.le...@gmail.com, Android CameraX Discussion Group, mengho...@gmail.com
What's the error you are seeing? Also, if you could create a minimal reproducible example on GitHub, it would be easier for us to diagnose the problem.

re.le...@gmail.com

unread,
Jul 6, 2021, 6:48:00 AM7/6/21
to Android CameraX Discussion Group, Xi Zhang, Android CameraX Discussion Group, mengho...@gmail.com, re.le...@gmail.com
Hi Xi, 
Sorry for the late response. I tried to reproduce the same issue with basic sample that just implements CameraX and did not get the error. That would suggest that the problem might be caused by some weird issue on our side. I will post here sample and errors if I am still unable to resolve this after checking our part.

Thanks
Reply all
Reply to author
Forward
0 new messages