Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot access 'kotlin.collections.Collection' which is a supertype of 'org.gradle.api.artifacts.dsl.RepositoryHandler'

enter image description here

I got the above error after i add Plugins{ `kotlin`} to my build.gradle.kts file.

I have Google this problem and rebuild after delete all .gradle、.idea dir, but this problem still occurs. Additionally, i tried invalidate caches, but not work.

Any ideas for this problem?

like image 409
Cyrus Avatar asked Jun 25 '21 16:06

Cyrus


1 Answers

You can try to delete Cache folder of Android Studio manually ~/Library/Caches/Google/AndroidStudio4.2

I had the same problem when upgrading Android Studio 4.2, Kotlin 1.5, and Gradle 7.0. This solution fixed my problem

like image 100
hientp Avatar answered Nov 09 '22 15:11

hientp