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

  • Gitlab Runner fails creating android build using the newer yml format
  • Setting up Ruby along with android in docker
  • APK is not installing in docker emulator
  • Running docker on Android
  • Android emulator in Docker
  • 'sh: 1: file: not found' when creating a android emulator inside a docker container
  • 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 volumes doesn't exist for data container in 1.9.1
  • How can I pull a Docker image from a private Docker Hub repo remotely?
  • How do I keep IPs in a dockerized Consul cluster on a single node after restart
  • How can I see a dynamically assigned port from within a docker container?
  • Trying to push an image to the docker registry
  • docker push fails due to “unauthorized: authentication required”, using gitlab
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.