1

Whenever i'm trying to run my gradle file , i keep getting this error even a simple test file throws this error.

Cannot locate JAR for module 'kotlin-compiler-embeddable-1.3.21-patched-for-gradle' in distribution directory

but why am i getting this , i'am not even using kotlin, is there a way to remove the kotlin dependency?? or is there something wrong with one of my settings?

This is question is similar to this question , but this question doesn't seem to have an answer to it , hopefully i could get one.


Edit : Android version is 4.0 and the dependency's are

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    implementation 'com.google.android.material:material:1.1.0'
    implementation 'com.google.code.gson:gson:2.8.5'
    testImplementation 'junit:junit:4.12'
}
Akash Jain
  • 684
  • 9
  • 23
  • have you updated android studio and try to invalidate cache and restart? – Fahim Bagar Jul 25 '20 at 20:54
  • yes , i have restarted it and cleared the cache..still the same issue – Akash Jain Jul 25 '20 at 21:25
  • what is your android version? and try to check this question https://stackoverflow.com/questions/49506307/gradle-project-sync-failed-after-android-studio-3-1-update and try the proposed answers there. Let me know if you have tried it and still failed. – Fahim Bagar Jul 25 '20 at 21:27
  • that's literally the first thing i tried , and also the issue are not the same , the person seems to have a kotlin dependency issue, but i don't even have a kotlin dependency , i'm using java ..... i'm really curious why it's asking a kotlin dependency when there should be no need for it – Akash Jain Jul 25 '20 at 21:36
  • 1
    Well, many reasons why android studio kind of forcing us to use kotlin, one of them is because "Include Kotlin support" is by default checked on new project (check https://stackoverflow.com/questions/49302552/make-android-studio-work-with-java-and-not-kotlin), others is because android studio has function to convert java to kotlin, now android is heavily relied on kotlin as its main language, etc. Try to update your question with your build.gradle file and android studio version, I will upvote this question – Fahim Bagar Jul 25 '20 at 21:44
  • 1
    it's very bad idea to force developers to force to use a different language, but i guess they have to make kotlin relevant some way..... – Akash Jain Jul 25 '20 at 21:50

0 Answers0