Closed JamesRoome closed 3 years ago
Thanks for submitting this issue and a workaround! I'm not sure if I can move the package. If remember correctly it was needed to access some package-private resources. I'll have a look if this can be fixed by other means though!
I didn't look into the details too much, other than "bytecode instrumentation magic". But now that I'm thinking about it, all you might need to tweak the companion object a bit so the instrumentation works.
Hi @JamesRoome, This should be now fixed in 4.1.0. Thanks for reporting this and providing a lot of info to fix the issue!
Yes is works, happy to delete my CustomRobolectricTestRunner!
Thanks for the quick fix.
Error When trying to do automated UI tests with Robolectric I get this error:
java.lang.IllegalAccessError: tried to access class kotlin.jvm.internal.DefaultConstructorMarker from class androidx.appcompat.widget.MaterialRecyclerViewPopupWindow$Companion
This is caused by
MaterialRecyclerViewPopupWindow
being in theandroidx
namespace so Robolectric does its bytecode magic on it.Fix: Don't put MaterialRecyclerViewPopupWindow in the androidx namespace.
Workaround: Use a custom RobolectricTestRunner