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文章来源:https://www.toymoban.com/news/detail-735147.html
解决方式
在android/build.gradle目录下:
**1.**将 compileSdkVersion 从 30 更改为 31 并将 targetSdkVersion 从 30 更改为 31
**2.**将ext.kotlin_version = ‘1.3.50’ 改为 ext.kotlin_version = ‘1.6.10’文章来源地址https://www.toymoban.com/news/detail-735147.html
到了这里,关于成功解决Execution failed for task ‘:app:checkDebugAarMetadata‘的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!