Error when merging DEX file containing classes with prefix 'j$.'

62 views Asked by At

I am trying to use the d8 tool for building a dex file from an instrumented Android app. The instrumentation consists on using JavaMOP monitors to identify possible misuses of crypto-APIs.

For specific apps, D8 raises an error with the following trace:

Error: com.android.tools.r8.internal.Sb: Merging DEX file containing classes with prefix 'j$.' with other classes, except classes with prefix 'java.', is not allowed: Coverage, android.support.v4.app.INotificationSideChannel$Stub$Proxy, android.support.v4.app.INotificationSideChannel$Stub, android.support.v4.app.INotificationSideChannel$_Parcel, android.support.v4.app.INotificationSideChannel, android.support.v4.app.RemoteActionCompatParcelizer, android.support.v4.graphics.drawable.IconCompatParcelizer, android.support.v4.media.AudioAttributesCompatParcelizer, android.support.v4.media.AudioAttributesImplApi21Parcelizer, android.support.v4.media.AudioAttributesImplApi26Parcelizer, android.support.v4.media.AudioAttributesImplBaseParcelizer, android.support.v4.media.MediaBrowserCompat$CallbackHandler...

How can I fix this kind of error when executing d8? I have tried with different versions of Android platform and min-sdk level. The command that I am running is:

d8 monitored-apk.jar --release --lib $ANDROID_HOME/android.jar --min-api 26

0

There are 0 answers