flexmark-java icon indicating copy to clipboard operation
flexmark-java copied to clipboard

Android Release build causes crash

Open mihirrai opened this issue 2 years ago • 2 comments

Everything works fine in release builds, until I start adding extensions.

Error thrown: java.lang.IllegalStateException: Dependent class class

The error thrown is coming from com.vladsch.flexmark.util.dependency.DependencyResolve, so pretty sure its contained within this library and something to with the android framework.

The only difference between debug and release builds is the obfuscation and shrinking. The crash is reproduced even after disabling obfuscation, didn't try disabling shrinking as it would completely bypass the logic of using R8 given the large size of the library.

mihirrai avatar Jul 27 '23 15:07 mihirrai

I am getting this issue as well, disabling shrinking makes it stop, although it is not good as it makes the app size much larger.

soupslurpr avatar Aug 09 '23 20:08 soupslurpr

I'm facing this as well ever since I started using AGP 8.0 which sets android.enableR8.fullMode to true by default. One could try to disable fullMode, but that's not ideal. Otherwise we need to find some proguard rules that add exceptions to flexmark, but I'm not sure where to start.

FilippoVigani avatar Aug 11 '23 09:08 FilippoVigani