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

  • Is it possible to run android emulator / android apps in docker?
  • Connecting to a USB Android Device in a Docker Container via adb
  • Android CI using Bitbucket Pipelines and Docker
  • Building an Android project from the command line with Docker
  • How to run appium test using aluedeke/appium-android docker image?
  • Drone local and
  • 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!

  • How to run docker-compose on remote host?
  • Kubernetes docker sample does not expose a port
  • Cannot import lxml in python:3.4 docker container
  • Can you have a docker copy in the same line as docker run
  • Nexus 3: “Remote Connection Pending…” for docker hub
  • Installing on Ubuntu 14.04LTS
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.