最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

java - How do I resolve this issue when adding health connect dependency in android studio? - Stack Overflow

programmeradmin3浏览0评论

The dependency is:

implementation("androidx.health.connect:connect-client:1.1.0-alpha11")

The error code that appears is:

Caused by: .gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction

I've tried updating the gradle, gradle plugin, changing the compile sdk version, and downgrading the dependency.

The dependency is:

implementation("androidx.health.connect:connect-client:1.1.0-alpha11")

The error code that appears is:

Caused by: .gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction

I've tried updating the gradle, gradle plugin, changing the compile sdk version, and downgrading the dependency.

Share Improve this question edited Feb 17 at 23:24 Jeffrey Lima asked Feb 17 at 22:39 Jeffrey LimaJeffrey Lima 234 bronze badges 2
  • How do you know that that's the dependency that's causing the problem? The error message doesn't mention that dependency. – k314159 Commented 2 days ago
  • When I run the code without this dependency it works fine. Then when I add the line the error appears. – Jeffrey Lima Commented 2 days ago
Add a comment  | 

2 Answers 2

Reset to default 1

I upgraded android studio to lady bug then I upgraded android gradle plugin to the latest version 8.8.1 using the AGP upgrade assistant. I also changed the compile sdk to 35 and target sdk to 34. I was then able to compile and run my code with the dependency.

instead of running on your main project and try to run that library to a new project. It might be some gradle issue while adding that libarary.

发布评论

评论列表(0)

  1. 暂无评论