0

After I started my Android project by selecting Kotlin as my language.The app gets an error when trying to sync with Kotlin gradle:

Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all artifacts for configuration ':classpath'.
Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: No cached version of org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.71 available for offline mode.

How can I fix this?

halfer
  • 19,824
  • 17
  • 99
  • 186
Toby Nwude
  • 391
  • 7
  • 24
  • Do you use `offline` mode? See https://stackoverflow.com/questions/22607661/no-cached-version-available-for-offline-mode. – CoolMind May 04 '20 at 19:30
  • https://stackoverflow.com/questions/61025926/android-studio-cant-find-kotlin-dependency/61025960#61025960 – MMG May 05 '20 at 05:47

2 Answers2

0

your android studio in offline mode so uncheck it

File => Settings => Build, Execution, Deployment => Build Tools => Gradle => Offline Work

After Gradle Sync Finished, Please Restart Your Android Studio.

0

I solved this by switching off my grade offline toggle

Toby Nwude
  • 391
  • 7
  • 24