You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to render any MathView in a Preview, I get an error. My Composable looks like this:
@Composable
privatefun_MathView(latex:String, modifier:Modifier = Modifier) {
val currentTextStyle =LocalTextStyle.current.merge(
MaterialTheme.colorScheme.onBackground
)
// Extract the font size from the current text styleval currentFontSize = currentTextStyle.fontSize
AndroidView(
modifier = modifier,
factory = { context ->MTMathView(context).apply {
this.latex = latex
this.fontSize =MTMathView.convertDpToPixel(currentFontSize.value)
this.textColor = currentTextStyle.color.hashCode()
}
},
)
}
And the error looks like this:
java.lang.UnsatisfiedLinkError: no main in java.library.path: C:\Users\oskar\AppData\Local\Programs\Android Studio 2\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;...
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2434)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818)
at java.base/java.lang.System.loadLibrary(System.java:1993)
at com.pvporbit.freetype.FreeType.<clinit>(FreeType.java:210)
at com.agog.mathdisplay.render.MTFontMathTable.<init>(MTFontMathTable.kt:90)
at com.agog.mathdisplay.render.MTFont.<init>(MTFont.kt:23)
at com.agog.mathdisplay.render.MTFont.<init>(MTFont.kt:13)
at com.agog.mathdisplay.MTFontManager$Companion.fontWithName(MTFontManager.kt:27)
at com.agog.mathdisplay.MTFontManager$Companion.latinModernFontWithSize(MTFontManager.kt:44)
at com.agog.mathdisplay.MTFontManager$Companion.defaultFont(MTFontManager.kt:56)
at com.agog.mathdisplay.MTMathView.<init>(MTMathView.kt:126)
at com.agog.mathdisplay.MTMathView.<init>(MTMathView.kt:29)
at com.oskar.hp.android.MathViewKt._MathView$lambda$3$lambda$2(MathView.kt:110)
at androidx.compose.ui.viewinterop.ViewFactoryHolder.<init>(AndroidView.android.kt:344)
...
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
The text was updated successfully, but these errors were encountered:
When trying to render any MathView in a Preview, I get an error. My Composable looks like this:
And the error looks like this:
The text was updated successfully, but these errors were encountered: