1

我正在将 Android 构建作业从 SLED 11 SP2 机器转移到 Ubuntu 14.04。在 Ubuntu 上,我安装了 java 版本“1.7.0_71”并使用 gradlew 版本 2.14.1。

但在构建过程中,我偶尔会收到以下错误。

Download https://jcenter.bintray.com/com/android/tools/build/gradle-core/2.1.3/gradle-core-2.1.3.jar
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'jabber-android'.
> Could not resolve all dependencies for configuration ':classpath'.
   > Could not download gradle-core.jar (com.android.tools.build:gradle-core:2.1.3)
      > Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle-core/2.1.3/gradle-core-2.1.3.jar'.
         > Invalid TLS padding data

在谷歌搜索解决方案时,我看到很多对 Java 加密代码的引用。但是一篇帖子听起来确实与我的问题相似。

https://www.wowza.com/forums/content.php?528-How-to-fix-intermittent-HTTP-SSL-failure-(padding-exception)

但是它说这个问题在 Java 7 更新 67 中得到了修复。也就是说,我应该得到修复。

在构建机器上重复此问题后,我远程访问它。我第一次直接运行命令时出现了错误。然后我跑了

gradlew --stacktrace --info

这没有重现问题。删除这些标志也不会导致问题再次出现。当我运行构建作业时,它通过了。

有没有其他人遇到过这个问题?我该如何解决?

更新:

测试后我只在使用时看到这个问题

repositories {
    jcenter()
}

如果我切换到

repositories {
    mavenCentral()
}

我无法重现上述问题。即在 build.gradle

更新:

我已经用 JDK 版本 1.8.0_111-b14 更新了机器。我仍然收到错误,但现在报告为

Download https://jcenter.bintray.com/com/neenbedankt/gradle/plugins/android-apt/1.8/android-apt-1.8.jar
Download https://jcenter.bintray.com/com/android/tools/build/gradle-core/2.1.3/gradle-core-2.1.3.jar

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'jabber-android'.
> Could not resolve all dependencies for configuration ':classpath'.
   > Could not download gradle-core.jar (com.android.tools.build:gradle-core:2.1.3)
      > Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle-core/2.1.3/gradle-core-2.1.3.jar'.
         > Tag mismatch!
4

0 回答 0