1

Faced with the following task: trying to run android ui tests on a minified, not debuggable build.

And I have a question: can mockK even work correctly on build with isDebuggable = false flag set?

I'm trying to run it now and catching:

Caused by: io.mockk.proxy.MockKAgentException:
Could not initialize inline mock maker. 
 Release: Android 11 7604015Device: google sdk_gphone_arm64
 at io.mockk.proxy.android.AndroidMockKAgentFactory.init(AndroidMockKAgentFactory.kt:76)
 at io.mockk.impl.JvmMockKGateway.<init>(JvmMockKGateway.kt:46)
 at io.mockk.impl.JvmMockKGateway.<clinit>(JvmMockKGateway.kt:186)
... 34 more
Caused by: java.lang.SecurityException: Can't attach agent, process is not debuggable.
 at dalvik.system.VMDebug.nativeAttachAgent(Native Method)
 at dalvik.system.VMDebug.attachAgent(VMDebug.java:572)
 at android.os.Debug.attachJvmtiAgent(Debug.java:2563)
 at io.mockk.proxy.android.JvmtiAgent.<init>(JvmtiAgent.kt:48)
 at io.mockk.proxy.android.AndroidMockKAgentFactory.init(AndroidMockKAgentFactory.kt:40)
... 36 more

agp version: 7.2.1 mockK version: 1.13.2 run on emulator: Android 11 api 30 google sdk_gphone_arm64

0 Answers0