Have been facing this error after migrating to AndroidX.
java.lang.IllegalStateException: SimpleTypeImpl should not be created for error type: ErrorScope{Error scope for class <ERROR CLASS> with arguments: org.jetbrains.kotlin.types.IndexedParametersSubstitution@14ac19e7}   This link does not help much
For me, the error was appearing due to invalid import statement. Android Studio didn't show anything regarding the same. I had to go to every single file, then studio shown the invalid import error. Fixed it and the build error's gone. 
I updated to Kotlin 1.3.20 but it still did not work. Then I decided to check the Kotlin source code. I found this link
I had an interface called DisplayItem<T> and I removed its type parameter. After this, I started to get the error. Actually, at the end of the error in logcat it says DisplayItem
So i checked all DisplayItem types in code and I found I forgat to remove one type parameter in a LiveData variable like the follwoing:
MediatorLiveData<DataHolder<List<DisplayItem<MessageViewEntity>>>>  After removing type parameter from the variable it started to compile. I hope this'll help you.
Note: You can use git grep for a quick search.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With