【问题标题】:Gradle sync not working after updating to version 3.3.0更新到版本 3.3.0 后 Gradle 同步不起作用
【发布时间】:2019-04-09 21:43:13
【问题描述】:

更新到 Android Studio Gradle 插件 3.3.0 后,我的同步过程不再工作。

我有一个多模块和多风格的 Android 应用程序进程,其中包含一个基础模块和依赖于该基础的不同的其他“上层”模块。

我在一些上层模块中遇到很多关于无法解决依赖关系的错误。

例如,我在 webview 模块中遇到的一些错误:

ERROR: Unable to resolve dependency for ':webview@env1DebugFeature/compileClasspath': Could not resolve androidx.core:core:1.0.0.
Show Details
Affected Modules: webview

ERROR: Unable to resolve dependency for ':webview@env1DebugFeature/compileClasspath': Could not resolve androidx.core:core:1.0.1.
Show Details
Affected Modules: webview

ERROR: Unable to resolve dependency for ':webview@env1ReleaseFeature/compileClasspath': Could not resolve androidx.core:core:1.0.0.
Show Details
Affected Modules: webview

ERROR: Unable to resolve dependency for ':webview@env1ReleaseFeature/compileClasspath': Could not resolve androidx.core:core:1.0.0.
Show Details
Affected Modules: webview

ERROR: Unable to resolve dependency for ':webview@env1ReleaseFeature/compileClasspath': Could not resolve androidx.core:core:1.0.1.
Show Details
Affected Modules: webview

ERROR: Unable to resolve dependency for ':webview@env2DebugFeature/compileClasspath': Could not resolve androidx.core:core:1.0.0.
Show Details
Affected Modules: webview

ERROR: Unable to resolve dependency for ':webview@env2DebugFeature/compileClasspath': Could not resolve androidx.core:core:1.0.0.
Show Details
Affected Modules: webview

ERROR: Unable to resolve dependency for ':webview@env2DebugFeature/compileClasspath': Could not resolve androidx.core:core:1.0.1.
Show Details
Affected Modules: webview

ERROR: Unable to resolve dependency for ':webview@env2ReleaseFeature/compileClasspath': Could not resolve androidx.core:core:1.0.0.
Show Details
Affected Modules: webview

ERROR: Unable to resolve dependency for ':webview@env2ReleaseFeature/compileClasspath': Could not resolve androidx.core:core:1.0.0.
Show Details
Affected Modules: webview

看起来存在依赖版本冲突的问题,但我之前在 3.2.1 中没有遇到此问题

我不想通过手动排除与所有其他依赖项产生冲突的依赖项版本来解决它,因为在我看来这是很多不必要的工作。

你知道如何解决这个问题吗?

【问题讨论】:

    标签: android android-gradle-plugin android-studio-3.3 android-gradle-plugin-3.3.0


    【解决方案1】:

    升级到 3.3.2。我不知道它为什么会起作用,但在我的情况下它确实存在同样的问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-07-02
      • 1970-01-01
      • 2019-06-18
      • 1970-01-01
      • 2020-11-15
      • 2020-09-16
      • 2021-12-02
      • 1970-01-01
      相关资源
      最近更新 更多