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.