数据绑定 + Gradle 与 Android Studio 2.3.3 相关的问题

Databinding + Gradle related issues with Android Studio 2.3.3

在我将我的 Android Studio 更新到 v2.3.3 并更新所需的构建工具和 sdk 版本后,当我 运行 ./gradlew assemble --stacktrace 时出现以下错误:

FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':OpenEdXMobile'.

Could not resolve all dependencies for configuration ':OpenEdXMobile:_prodDebugApkCopy'. Could not find com.android.databinding:baseLibrary:2.3.3. Searched in the following locations: file:/usr/local/android-sdk/extras/android/m2repository/com/android/databinding/baseLibrary/2.3.3/baseLibrary-2.3.3.pom file:/usr/local/android-sdk/extras/android/m2repository/com/android/databinding/baseLibrary/2.3.3/baseLibrary-2.3.3.jar file:/home/travis/build/edx/edx-app-android/sdk-manager/com/android/databinding/baseLibrary/2.3.3/baseLibrary-2.3.3.jar Required by: project :OpenEdXMobile Could not find com.android.databinding:baseLibrary:2.3.3. Searched in the following locations: file:/usr/local/android-sdk/extras/android/m2repository/com/android/databinding/baseLibrary/2.3.3/baseLibrary-2.3.3.pom file:/usr/local/android-sdk/extras/android/m2repository/com/android/databinding/baseLibrary/2.3.3/baseLibrary-2.3.3.jar file:/home/travis/build/edx/edx-app-android/sdk-manager/com/android/databinding/baseLibrary/2.3.3/baseLibrary-2.3.3.jar Required by: project :OpenEdXMobile > com.android.databinding:library:1.3.1 project :OpenEdXMobile > com.android.databinding:adapters:1.3.1

来自 Travis-CI 的完整报告可以是 found here.

以下是一些相关细节:

gradle的分布url:distributionUrl=https://services.gradle.org/distributions/gradle-3.3-all.zip

Gradle 在我模块的 build.gradle 中的版本是 v2.3.3.

我的完整 build.gradle 有点大所以这里是 link。 https://github.com/edx/edx-app-android/blob/f899aeca945dea9a010af727e2b3ff1176e86f4e/build.gradle

如果我遗漏了任何细节,请指出:)

遗憾的是,我无法找到适用于问题中提到的设置和版本的解决方案。

快速修复: 我只需要将 gradle 版本降级到 v2.3.0,一切正常。

未来计划: 找到解决方案后会更新此答案,现在我已经提到了快速修复,以便社区可以受益。