Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to load class 'kotlin.collections.CollectionsKT' error when trying to sync gradle

Today I started to get the error Unable to load class 'kotlin.collections.CollectionsKT' (as show in this image) every time I try to gradle sync my project. I couldn't find anything on this error and the only solution seems to be to disable kotlin plugin on Intellij. Some of my projects doesn't have kotlin, but others have (the ones without kotlin also throw this error when trying to sync), so that isn't viable option.

Does anyone have any clue on what it could be?

like image 343
Erik Avatar asked Nov 21 '17 16:11

Erik


2 Answers

Strange, I started experiencing this issue today as well. In my case, I did not need to disable the Kotlin plugin, but I did need to upgrade the Gradle distribution (in the gradle-wrapper.properties) from 3.3 to 4.1 Someone logged a ticket in the issue tracker for this. If you could provide your feedback there and vote up that issue, it may help to get this resolved quicker.

like image 169
Phileo99 Avatar answered Oct 23 '22 15:10

Phileo99


Proguard obfuscation will also do this; you may need to set minifyEnabled false in your build.gradle

like image 1
drc Avatar answered Oct 23 '22 15:10

drc