**问题的原因是什么?**我在应用程序销售中遇到了这样的错误。我找不到任何解决方案。
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:dataBindingMergeDependencyArtifactsDebug'.
> Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not resolve androidx.core:core-ktx:+.
Required by:
project :app
> Skipped due to earlier error
> Failed to list versions for androidx.core:core-ktx.
> Unable to load Maven meta-data from https://dl.bintray.com/kotlin/kotlin-eap/androidx/core/core-ktx/maven-metadata.xml.
> Could not get resource 'https://dl.bintray.com/kotlin/kotlin-eap/androidx/core/core-ktx/maven-metadata.xml'.
> Could not GET 'https://dl.bintray.com/kotlin/kotlin-eap/androidx/core/core-ktx/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
3条答案
按热度按时间kuarbcqp1#
您需要正确声明依赖项
"androidx.core:core-ktx:$core_version"
watbbzwu2#
这是因为现在不再支持文件盒了。转到你的项目级别
build.gradle
,注解掉allprojects
和repositories
部分中的文件盒依赖项Bintray Shutdown
jaql4c8m3#
正如@Narendra_Nath所说,这是由于bintray依赖项和Jcenter关闭。您可以参考本文https://blog.gradle.org/jcenter-shutdown
对我有效的解决方案是将(Top-level build.gradle)中的存储库更改为