CameraX 1.5.0 fails to build

262 views
Skip to first unread message
Assigned to [email protected] by [email protected]

Anton Ivanov

unread,
Sep 18, 2025, 12:02:19 AM9/18/25
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 PM9/23/25
to Android CameraX Discussion Group, [email protected]
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.

[email protected] 在 2025年9月18日 星期四凌晨12:02:19 [UTC+8] 的信中寫道:

Anton Ivanov

unread,
Sep 23, 2025, 7:36:14 PM9/23/25
to Android CameraX Discussion Group, [email protected], Anton Ivanov
Should not it be included by the CameraX itself?

Anton Ivanov

unread,
Sep 23, 2025, 7:37:07 PM9/23/25
to Android CameraX Discussion Group, Anton Ivanov, [email protected]
Also CameraX 1.4.* didn't require it to be included

Andrew Chiang

unread,
Sep 26, 2025, 5:01:20 PM9/26/25
to Android CameraX Discussion Group, [email protected], 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?

[email protected] 在 2025年9月23日 星期二晚上7:37:07 [UTC+8] 的信中寫道:

Anton Ivanov

unread,
Sep 26, 2025, 6:50:25 PM9/26/25
to Android CameraX Discussion Group, [email protected], Anton Ivanov
Nothing has been changed apart from updating the app.

Andrew Chiang

unread,
Sep 26, 2025, 10:43:27 PM9/26/25
to Android CameraX Discussion Group, [email protected], Andrew Chiang
Thanks for the clarification. I'll check the dependencies.

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