I am facing the below issue when using Jacoco in multi user android system.
09-22 07:36:45.963 18134 18134 E AndroidRuntime: java.lang.ExceptionInInitializerError
09-22 07:36:45.963 18134 18134 E AndroidRuntime: at java.lang.Class.newInstance(Native Method)
09-22 07:36:45.963 18134 18134 E AndroidRuntime: at android.app.Instrumentation.newApplication(Instrumentation.java:1007)
09-22 07:36:45.963 18134 18134 E AndroidRuntime: at android.app.Instrumentation.newApplication(Instrumentation.java:992)
09-22 07:36:45.963 18134 18134 E AndroidRuntime: at android.app.LoadedApk.makeApplication(LoadedApk.java:832)
09-22 07:36:45.963 18134 18134 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5449)
09-22 07:36:45.963 18134 18134 E AndroidRuntime: at android.app.ActivityThread.-wrap2(ActivityThread.java)
09-22 07:36:45.963 18134 18134 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1555)
09-22 07:36:45.963 18134 18134 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
09-22 07:36:45.963 18134 18134 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154)
09-22 07:36:45.963 18134 18134 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6194)
09-22 07:36:45.963 18134 18134 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
09-22 07:36:45.963 18134 18134 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:911)
09-22 07:36:45.963 18134 18134 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:801)
When I switch to android user1 -> The application instance will be spawned in user1's context. This makes the user1 instance try to capture the port which already used by user0 instance of the same application -> This crashes the application.
1. Can the runtime exception be suppressed or handled?