Connection refused during building process in official fdroid server

I’m looking at the reason why one (Android) app of mine wasn’t updated for some days. When I look at the build log, it says the build has failed (for the most recent two versions).

The error happens when downloading https://dl.google.com/android/repository/addons_list-3.xml, though the final failure reason is not:

The first log says:

Download https://dl.google.com/dl/android/maven2/com/android/tools/external/com-intellij/intellij-core/26.0.1/intellij-core-26.0.1.jar
Download https://jcenter.bintray.com/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.jar
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
Configuration 'testCompile' in project ':app' is deprecated. Use 'testImplementation' instead.
Configuration 'androidTestCompile' in project ':app' is deprecated. Use 'androidTestImplementation' instead.
File /home/vagrant/.android/repositories.cfg could not be loaded.
IOException: https://dl.google.com/android/repository/addons_list-3.xml
java.net.ConnectException: Connection refused (Connection refused)
IOException: https://dl.google.com/android/repository/addons_list-2.xml
java.net.ConnectException: Connection refused (Connection refused)
IOException: https://dl.google.com/android/repository/addons_list-1.xml
java.net.ConnectException: Connection refused (Connection refused)
Failed to download any source lists!
java.net.ConnectException: Connection refused (Connection refused)

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Failed to find Platform SDK with path: platforms;android-27

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 47s
==== detail end ====

The second log (4 minutes after the first one) is almost the same as the first one, though the final error is not the same:

Download https://jcenter.bintray.com/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.jar
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
Configuration 'testCompile' in project ':app' is deprecated. Use 'testImplementation' instead.
Configuration 'androidTestCompile' in project ':app' is deprecated. Use 'androidTestImplementation' instead.
File /home/vagrant/.android/repositories.cfg could not be loaded.
IOException: https://dl.google.com/android/repository/addons_list-3.xml
java.net.ConnectException: Connection refused (Connection refused)
IOException: https://dl.google.com/android/repository/addons_list-2.xml
java.net.ConnectException: Connection refused (Connection refused)
IOException: https://dl.google.com/android/repository/addons_list-1.xml
java.net.ConnectException: Connection refused (Connection refused)
Failed to download any source lists!
java.net.ConnectException: Connection refused (Connection refused)

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Failed to find Build Tools revision 27.0.2

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 44s
==== detail end ====

That seems strange (at least to me). Does anyone encounter the same issue?

(p.s. I have CI on the repo, and the CI can build the app successfully.)

Looks like a temporary network glitch.

Another (two) automatic building attempt is triggered today, but the result is still “failed”.

One (the one for a newer version) of the errors is:

* What went wrong:
A problem occurred configuring project ':app'.
> Failed to find Platform SDK with path: platforms;android-27

The other one is (yes, that’s all):

== Installed Android Tools ==

INFO: Creating log directory
INFO: Creating temporary directory
INFO: Creating output directory
INFO: Using git version 2.11.0
INFO: Building version 0.4.8 (47) of ryey.easer
INFO: Getting source for revision v0.4.8
INFO: Creating local.properties file at build/ryey.easer/local.properties
INFO: Creating local.properties file at build/ryey.easer/app/local.properties
INFO: Cleaning Gradle project...

Still looks strange…

I’ve seen those failures. No idea what happened. Anyway, they’ll be retried.

The error now seems to be fixed to:
Failed to find Platform SDK with path: platforms;android-27

Maybe it’s similar to Failed to find target with hash string 'android-25', though android-25 is actually installed - Stack Overflow ?

Download the sdk and upgrade gradle to 4.1

Just find the issue is located:

Thanks guys.

Is anyone is interested in a quick patch to similar problems, this commit may be a useful example.