我一直在研究Cordova应用程序,我一直在测试三星SM-J700P.
我对Material Icons的设置基本上是这样的:
HTML -
<div id="alarm"><i class="material-icons">add_alert</i></div>
Run Code Online (Sandbox Code Playgroud)
CSS -
@font-face {
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
src:
url(./path/to/MaterialIcons-Regular.woff2) format(woff2),
url(./path/to/MaterialIcons-Regular.woff) format(woff);
}
Run Code Online (Sandbox Code Playgroud)
我在我的项目中本地保存了Material Icons包,因此访问图标应该没有任何问题.这已经在这款手机上进行了整个测试,直到几天前,我得到了我的SM-J700P的更新.之后,我的图标都不再出现了.手机上当前版本的软件是:J700PVPS1AQD1.
因为Cordova在Android上默认为chrome窗口,所以我只需要woff2包用于图标,所以我怀疑这是问题所在.运行程序时,我的Android Studio控制台中也出现了一个奇怪的错误.
E/libEGL: validate_display:225 error 3008 (EGL_BAD_DISPLAY)
I/OpenGLRenderer: Initialized EGL, version 1.4
W/AudioCapabilities: Unsupported mime audio/mpeg-L1
W/AudioCapabilities: Unsupported mime audio/mpeg-L2
//... Lots more Unsupported mime types which I don't understand...
E/chromium: [ERROR:interface_registry.cc(104)] Failed to locate a binder for interface: autofill::mojom::PasswordManagerDriver
More unsupported mime types...
Run Code Online (Sandbox Code Playgroud)
我不知道控制台中的这些错误有多重要,但是自更新以来它们也是新的.该应用程序的其余部分工作正常,这些错误都没有崩溃,它只是不再显示材料图标.
有任何想法吗?
编辑:更多信息.如果我只在我自己的Chrome浏览器中显示html文件,则图标会正常显示.所以看起来这可能是Cordova的一个问题.我还使用三星S7 Edge测试了应用程序,它也不会显示图标,因此它似乎与手机无关.