您现在的位置是:首页 >其他 >成功解决Execution failed for task ‘:app:checkDebugAarMetadata‘网站首页其他

成功解决Execution failed for task ‘:app:checkDebugAarMetadata‘

在路上的小王 2023-05-17 20:00:02
简介成功解决Execution failed for task ‘:app:checkDebugAarMetadata‘

yarn android的时候出现这个错误:
Execution failed for task ‘:app:checkDebugAarMetadata’
详细错误信息如下

Could not resolve all files for configuration ‘:app:debugRuntimeClasspath’.
Could not find com.android.support.constraint:constraint-layout:1.1.3.
Searched in the following locations:
- https://jcenter.bintray.com/com/android/support/constraint/constraint-layout/1.1.3/constraint-layout-1.1.3.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in ‘Maven POM’ format, you need to adjust the ‘metadataSources { … }’ of the repository declaration.
Required by:
project :app
Could not find com.android.support:appcompat-v7:25.3.1.
Searched in the following locations:
- https://jcenter.bintray.com/com/android/support/appcompat-v7/25.3.1/appcompat-v7-25.3.1.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in ‘Maven POM’ format, you need to adjust the ‘metadataSources { … }’ of the repository declaration.
Required by:
project :app
Could not find com.android.support:support-v4:25.3.1.
Searched in the following locations:
- https://jcenter.bintray.com/com/android/support/support-v4/25.3.1/support-v4-25.3.1.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in ‘Maven POM’ format, you need to adjust the ‘metadataSources { … }’ of the repository declaration.
Required by:
project :app
Could not find com.android.support:design:25.3.1.
Searched in the following locations:
- https://jcenter.bintray.com/com/android/support/design/25.3.1/design-25.3.1.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in ‘Maven POM’ format, you need to adjust the ‘metadataSources { … }’ of the repository declaration.
Required by:
project :app

解决方式
在android/build.gradle目录下:
**1.**将 compileSdkVersion 从 30 更改为 31 并将 targetSdkVersion 从 30 更改为 31
**2.**将ext.kotlin_version = ‘1.3.50’ 改为 ext.kotlin_version = ‘1.6.10’

风语者!平时喜欢研究各种技术,目前在从事后端开发工作,热爱生活、热爱工作。