com.vladsch.flexmark.util.data.DataKey$$ExternalSyntheticLambda2
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.appbanlaptop, PID: 8706
java.lang.NoClassDefFoundError: com.vladsch.flexmark.util.data.DataKey$$ExternalSyntheticLambda2
at com.vladsch.flexmark.util.data.DataKey.
I'm use implementation 'com.vladsch.flexmark:flexmark-all:0.64.0' and i meet this error Code java: MutableDataSet options = new MutableDataSet(); Parser parser = Parser.builder(options).build(); HtmlRenderer renderer = HtmlRenderer.builder(options).build(); Node document = parser.parse("This is Sparta"); String html = renderer.render(document); System.out.println(html);
I am facing the same issue. The error occurs on Android with API below 24.
The code of the lib on line 69 of DataKey.java is not the simplest one:
public DataKey(@NotNull String name, @NotNull T defaultValue) {
this(name, defaultValue, options -> defaultValue);
}
My best guess is that this kind of Lamdda is not supported below API 24. A lot of functional stuff was added in API 24. See e.g. https://developer.android.com/reference/java/util/function/Supplier: "Added in API level 24".
If this is confirmed, it might be useful, to mention this in the README.md's Android section.