4

I tested and debugged my app successfully but when I want to release apk of my app, on Execute Lint it got into this error :

Could not find kotlin-compiler.jar (com.android.tools.external.com-intellij:kotlin-compiler:26.5.0).
Searched in the following locations:
    https://dl.google.com/dl/android/maven2/com/android/tools/external/com-intellij/kotlin-compiler/26.5.0/kotlin-compiler-26.5.0.jar

when I click that link, it successfully get downloaded in browser, but I have no idea why android sutdio could not find it. Also my offline work is unselected.

Obtice
  • 1,205
  • 3
  • 18
  • 44

1 Answers1

0

I disabled offline work in gradle tab and also according to answers of this question I changed order of repositories but none of those solved my problem. Instead I cleared cache and after that everything came back to normal. Here is how I cleared gradle cache:

  1. Clear Project Cache — there are 2 hidden directories in the main level of your project (after your first compile). Hint: on Mac type “cmd-shift-.” if you don’t see these files in your Finder window. Delete both the directories:

    [project home]/.idea

    [project home]/.gradle

  2. Delete the system Gradle cache. Delete this folder:

    /[userhome]/.gradle/cache

Mojtaba
  • 205
  • 3
  • 10