3

I've been attempting to use this MathView to display math formula in my app. So far I have been following the readme to get a basic equation to display but am getting the error of "Unable to open asset URL". This is causing the display to not display at all.

As far as I am aware this is attempting to use a font that it can not find within my project, I have found a link to get access to the fonts it is trying to find as .woff files but I am unsure how or where I need to put this file within my project. On the other hand I do currently have these fonts already within my project but they are saved as .otf files instead of .woff files.

Is there a place where I can see or change where it is looking for this file?

Below are the errors in my Logcat

2019-02-27 13:40:41.733 14615-14643/com.example.optometryapp E/AndroidProtocolHandler: Unable to open asset URL: file:///android_asset/MathJax/images/CloseX-31.png?rev=2.5.3
2019-02-27 13:40:42.079 14615-14658/com.example.optometryapp E/AndroidProtocolHandler: Unable to open asset URL: file:///android_asset/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Main-Regular.woff?rev=2.5.3
2019-02-27 13:40:42.086 14615-14659/com.example.optometryapp E/AndroidProtocolHandler: Unable to open asset URL: file:///android_asset/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Math-Italic.woff?rev=2.5.3
2019-02-27 13:40:42.094 14615-14643/com.example.optometryapp E/AndroidProtocolHandler: Unable to open asset URL: file:///android_asset/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Size1-Regular.woff?rev=2.5.3

Thanks

devDan
  • 5,969
  • 3
  • 21
  • 40
  • Is your asset folder stored in `app/src/main/assets`? Where does `file:///android_assets/` point to in project structure? – Roberto Manfreda Feb 27 '19 at 15:00
  • Currently I do not have an asset folder in that location. I did create one and copied the .woff folder in there with the relevant files it is looking for but I then get an error about "File was loaded in the wrong encoding: 'UTF-8" – user7407296 Feb 27 '19 at 15:17
  • See this https://stackoverflow.com/questions/43153703/file-was-loaded-in-the-wrong-encodingutf-8-in-intellij-idea – Roberto Manfreda Feb 27 '19 at 17:12

0 Answers0