1
votes

I am trying to develop a simple android application using Android Studio 3.1.1. While building I am getting a sync failed error from gradle. The bottom Build panel shows this error message.

Could not HEAD 'http://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jre8/1.2.0/kotlin-stdlib-jre8-1.2.0.pom'. Received status code 503 from server: Service Unavailable Enable Gradle 'offline mode' and sync project

In my organization the access to this CDN is blocked. I tried by enabling the 'offline mode', now I am getting this error.

No cached version of org.jetbrains.kotlin:kotlin-stdlib-jre8:1.2.0 available for offline mode. Disable Gradle 'offline mode' and sync project

I downloaded the file kotlin-stdlib-jre8-1.2.0.pom, but I don't know where to put it so that Gradle can use it (as a cached version).

Is there any way to make this work when the CDN site is not accessible?

Or anyone know the windows folder where the gradle stores the cached libs?

1

1 Answers

1
votes

Gradle supports an array of repository types. If you cannot use a Maven repository hosted by your organisation, there are other options available, like a flat directory repository or something else.

I would not recommend attempting to trick Gradle in believing it downloaded the dependencies. These are internal formats, subject to change from version to version.