VerifyError when using jacoco coverage for Android

gradle connectedCheckworks fine for me only when coverage executes my POJO objects. When it starts touching the mocking object or says it MyContentProvider extends ContentProvideris going to be called by the test, I get VerifyError.

06-06 13:27:05.664 E/AndroidRuntime( 2443): java.lang.VerifyError:     com/myapp/contentprovider/EthanContentProvider
06-06 13:27:05.664 E/AndroidRuntime( 2443):     at java.lang.Class.newInstanceImpl(Native Method)
06-06 13:27:05.664 E/AndroidRuntime( 2443):     at java.lang.Class.newInstance(Class.java:1208)
06-06 13:27:05.664 E/AndroidRuntime( 2443):     at android.app.ActivityThread.installProvider(ActivityThread.java:4778)
06-06 13:27:05.664 E/AndroidRuntime( 2443):     at android.app.ActivityThread.installContentProviders(ActivityThread.java:4385)

After deep deepening, I understand that this problem is associated with an attempt to match the in-depth ContentProvider SDK and the real one with device framework.jar. Jacoco, when preprocessing classes, added method pointers to a file that it reuses at run time (.em file).

Any suggestions / ideas?

Sorry for the layout style of the question. Feel free to edit.

+4
source share

Source: https://habr.com/ru/post/1543569/


All Articles