Robolectric has a shadow class named ShadowMatrix
but I don't want to use it. How to remove it from robolectric? I hope to use original Matrix
class instead.
It won't work. In android.jar are only stubs of classes and methods (methods without body). That's the reason you're using Robolectric to run tests outside Android system.
That what you can do is to make a fork from github repository, change the ShadowMatrix implementation, build and use it with your project.