Kotlin Compiler in Android Application: Connection refused to host: 127.0.0.1 Kotlin Compiler in Android Application: Connection refused to host: 127.0.0.1 docker docker

Kotlin Compiler in Android Application: Connection refused to host: 127.0.0.1


This could be KT-15562 which describes the same problem and suggests that you disable "compiling independent modules in parallel". You can also disable the Gradle daemon for the build. Or even turning off incremental compilation (is probably best in CI to do full builds anyway). Gradle properties for these settings:

org.gradle.daemon=falseorg.gradle.parallel=falsekotlin.incremental=false

This issue is showing in versions up through 1.1.2 so you can track the issue above, but also try the workarounds.

As another option, unexplained process death could be due to running out of memory in your container and not having enough or any swap space configured.