I Had the same issue and finally discovered the reason. In my case it was a badly written Java method:
@FormUrlEncoded
@POST("register-user/")
Call<RegisterUserApiResponse> registerUser(
@Field("email") String email,
@Field("password") String password,
@Field("date") String birthDate,
);
Note the illegal comma after the "date" field. For some reason the compiler could not reveal this exact error, and came with the ':app:compileDebugKotlin'. > Compilation error
thing.