no cached version available for offline mode

后端 未结 9 1669
死守一世寂寞
死守一世寂寞 2020-11-30 07:38

At office, I am behind a proxy. The internet access is restricted.

So I performed a gradle sync at home and copied the folder \".gradle\" present at C:\\Users\\user

9条回答
  •  既然无缘
    2020-11-30 08:06

    Try running gradle with the --debug flag, in addition to the --offline flag. That will tell you exactly where it's looking for the files.

    One possible reason for the error is that the path of the .gradle folder is different between your home and office PC, possibly because your username is different on each machine. The .gradle cache uses absolute paths (see .gradle/caches/modules-2/metadata-2.16/artifact-at-repository.bin for an example). This is a documented Gradle issue: https://discuss.gradle.org/t/copying-the-gradle-cache-to-another-machine/7546/13. If possible, use the same GRADLE_HOME at home and work to resolve the issue.

提交回复
热议问题