Gradle not able to download andriod packages

I have a docker container with Andriod SDK on it. I am trying to build a Andriod Java application using gradlew. The thing is if i need to download from the internet I need to use proxy. For which I have configured my andriod and gradle to use the proxy setting.

I am able to download packages from the commandline using command

  • AAPT2 failing to merge resources on Docker
  • Running docker on Android
  • Android instrumentation test with Bitbucket pipelane and Docker
  • Is there an Official Android development environment image on Docker?
  • Connection reset by peer @ io_fillbuf - fd:8 (HTTPClient::KeepAliveDisconnected)
  • Why is my volume empty when binding it to a host folder?
  • andriod update sdk

    But when i run gradlew it is able to download the dependency from jcentre but it fails trying to download some Andriod package i think. I have pasted the error message below.

    cat /root/.android/androidtool.cfg



    ./gradlew clean test assemble

    DK is missing a "platforms" directory.
    If you are using NDK, verify the ndk.dir is set to a valid NDK directory.  It is currently set to /sdk/ndk-bundle.
    If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or to remove this warning.
        File /root/.android/repositories.cfg could not be loaded. Connection timed out (Connection timed out)
        IOException: Connection timed out (Connection timed out)
        IOException: Connection timed out (Connection timed out)
        IOException: Connection timed out (Connection timed out)
        Failed to download any source lists!

  • Docker - Install CI Server on a remote host
  • fork/exec ./debug: operation not permitted
  • How to switch between active docker machine on window
  • Request entitity too large when uploading file on redmine docker
  • Parsing Docker image tag into component parts [duplicate]
  • How to get readline working with python in alpine
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.