如何解决android-无法从 build.gradle 文件中删除依赖项
我一直在我的应用中使用 androidx.lifecycle:lifecycle-viewmodel
和 androidx.lifecycle:lifecycle-livedata
依赖项,现在我想删除它们。我删除了我的应用程序中使用这些库的所有代码,然后从我的 build.gradle 文件中删除了它们。现在当我重建我的项目时,我得到:
Execution failed for task ':app:compileDebugAidl'.
> Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Failed to transform lifecycle-viewmodel-2.1.0.aar (androidx.lifecycle:lifecycle-viewmodel:2.1.0) to
match attributes {artifactType=android-aidl,org.gradle.status=release}.
> Could not find lifecycle-viewmodel-2.1.0.aar (androidx.lifecycle:lifecycle-viewmodel:2.1.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-viewmodel/2.1.0/lifecycle-viewmodel-2.1.0.aar
> Failed to transform lifecycle-viewmodel-2.1.0.aar (androidx.lifecycle:lifecycle-viewmodel:2.1.0) to match attributes {artifactType=android-aidl,org.gradle.status=release}.
> Could not find lifecycle-viewmodel-2.1.0.aar (androidx.lifecycle:lifecycle-viewmodel:2.1.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-viewmodel/2.1.0/lifecycle-viewmodel-2.1.0.aar
> Failed to transform lifecycle-viewmodel-2.1.0.aar (androidx.lifecycle:lifecycle-viewmodel:2.1.0) to match attributes {artifactType=android-aidl,org.gradle.status=release}.
> Could not find lifecycle-viewmodel-2.1.0.aar (androidx.lifecycle:lifecycle-viewmodel:2.1.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-viewmodel/2.1.0/lifecycle-viewmodel-2.1.0.aar
> Failed to transform lifecycle-livedata-2.0.0.aar (androidx.lifecycle:lifecycle-livedata:2.0.0) to match attributes {artifactType=android-aidl,org.gradle.status=release}.
> Could not find lifecycle-livedata-2.0.0.aar (androidx.lifecycle:lifecycle-livedata:2.0.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-livedata/2.0.0/lifecycle-livedata-2.0.0.aar
> Failed to transform lifecycle-livedata-core-2.0.0.aar (androidx.lifecycle:lifecycle-livedata-core:2.0.0) to match attributes {artifactType=android-aidl,org.gradle.status=release}.
> Could not find lifecycle-livedata-core-2.0.0.aar (androidx.lifecycle:lifecycle-livedata-core:2.0.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-livedata-core/2.0.0/lifecycle-livedata-core-2.0.0.aar
> Failed to transform core-runtime-2.0.0.aar (androidx.arch.core:core-runtime:2.0.0) to match attributes {artifactType=android-aidl,org.gradle.status=release}.
> Could not find core-runtime-2.0.0.aar (androidx.arch.core:core-runtime:2.0.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/arch/core/core-runtime/2.0.0/core-runtime-2.0.0.aar
> Failed to transform core-runtime-2.0.0.aar (androidx.arch.core:core-runtime:2.0.0) to match attributes {artifactType=android-aidl,org.gradle.status=release}.
> Could not find core-runtime-2.0.0.aar (androidx.arch.core:core-runtime:2.0.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/arch/core/core-runtime/2.0.0/core-runtime-2.0.0.aar
Possible solution:
- Declare repository providing the artifact,see the documentation at
https://docs.gradle.org/current/userguide/declaring_repositories.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。