Error running jetpack compose android app using espresso driver

my team move our exesting app to jetpack compsose. so, when i try to open it using appium espresso driver, I get this error on server side.
[debug] [EspressoDriver@f6ed (6b5b066b)] java.lang.NoSuchMethodError: No virtual method addOnConfigurationChangedListener(Landroidx/core/util/Consumer;)V in class Landroidx/activity/ComponentActivity; or its super classes (declaration of 'androidx.activity.ComponentActivity' appears in /data/app/~~WiKGbjHS3lzBlxHqyDPuXQ==/io.appium.espressoserver.test-cBvgPMMmfnkbWKmBOF3amQ==/base.apk)

can anyone help please

just for sure Android app built with Espresso dependencies?

thanks for your answers. Please what is actually the best way to automate android jetpack compose application ? espresso driver or uiautomator2 ??

This article may be of help:

No idea. I am with uiautomator2. Also note that jetpack supports adding ids/testTags that is visible in uiautomator2. Our dev using it quite often when i am asking for more ids on screen.

and this works for you?
@AndroidFindBy(uiAutomator = “new UiSelector().resourceId(“myButtonId”)”)
protected WebElement myButton;