I have tried to test my code with robolectric. Problem is that it has duplicated References. e.g.
java.lang.RuntimeException: java.lang.RuntimeException: Duplica
The solution for me was to ensure that I was not requiring Robolectric in my androidTestImplementation dependencies.
androidTestImplementation
Once I fixed that, I did not have any conflicts to fix.