CameraX 1.5.0 fails to build

88 views
Skip to first unread message
Assigned to andrew...@google.com by tah...@google.com

Anton Ivanov

unread,
Sep 17, 2025, 12:02:19 PMSep 17
to Android CameraX Discussion Group
Hey, I'm updating to version 1.5.0 and it seems there's a problem with building it.
I get this error:

.gradle/caches/8.14/transforms/1b6f66bbcb501a9bf056a17ffd09a751/transformed/camera-core-1.5.0-api.jar(/androidx/camera/core/SurfaceRequest.class): error: Cannot attach type annotations @org.jspecify.annotations.NonNull to SurfaceRequest.mSurfaceRecreationCompleter:

  class file for androidx.concurrent.futures.CallbackToFutureAdapter not found


Adding implementation("androidx.concurrent:concurrent-futures:1.1.0") helps however.

Andrew Chiang

unread,
Sep 23, 2025, 2:07:22 AMSep 23
to Android CameraX Discussion Group, anton....@revolut.com
Hi,
Thank you for your question.

The androidx.concurrent:concurrent-futures library is a common and often necessary dependency(see link).

You often don't need to add it for a basic setup. But CameraX relies on ListenableFuture for many operations. It might need to add this dependency manually if you are using related opreations.

anton....@revolut.com 在 2025年9月18日 星期四凌晨12:02:19 [UTC+8] 的信中寫道:

Anton Ivanov

unread,
Sep 23, 2025, 7:36:14 AMSep 23
to Android CameraX Discussion Group, andrew...@google.com, Anton Ivanov
Should not it be included by the CameraX itself?

Anton Ivanov

unread,
Sep 23, 2025, 7:37:07 AMSep 23
to Android CameraX Discussion Group, Anton Ivanov, andrew...@google.com
Also CameraX 1.4.* didn't require it to be included

Andrew Chiang

unread,
Sep 26, 2025, 5:01:20 AMSep 26
to Android CameraX Discussion Group, anton....@revolut.com, Andrew Chiang
Sorry for the late reply.

Have you updated the code related to ListenableFuture after updating to 1.5, such as using get() or await() for ProcessCameraProvider or the Extensions?

anton....@revolut.com 在 2025年9月23日 星期二晚上7:37:07 [UTC+8] 的信中寫道:

Anton Ivanov

unread,
Sep 26, 2025, 6:50:25 AM (14 days ago) Sep 26
to Android CameraX Discussion Group, andrew...@google.com, Anton Ivanov
Nothing has been changed apart from updating the app.

Andrew Chiang

unread,
Sep 26, 2025, 10:43:27 AM (14 days ago) Sep 26
to Android CameraX Discussion Group, anton....@revolut.com, Andrew Chiang
Thanks for the clarification. I'll check the dependencies.

anton....@revolut.com 在 2025年9月26日 星期五下午6:50:25 [UTC+8] 的信中寫道:
Reply all
Reply to author
Forward
0 new messages