Я создал базовый ионный проект с ионным запуском и angular, я пробовал использовать многие шаблоны по умолчанию, например шаблон вкладок, и получаю ту же ошибку.
После создания я запустил ng build, а затем npx cap copy , синхронизация ограничения npx,
Код: Выделить всё
ionic capacitor add androidПосле запуска ng build я получаю небольшие предупреждения желтого цвета:
Код: Выделить всё
Generating index html...20 rules skipped due to selector errors:
:host-context([dir=rtl]) .ion-float-start -> Unknown pseudo-class :host-context([object Object])
.ion-float-start:dir(rtl) -> Unknown pseudo-class :dir
:host-context([dir=rtl]) .ion-float-end -> Unknown pseudo-class :host-context([object Object])
.ion-float-end:dir(rtl) -> Unknown pseudo-class :dir
:host-context([dir=rtl]) .ion-float-sm-start -> Unknown pseudo-class :host-context([object Object])
.ion-float-sm-start:dir(rtl) -> Unknown pseudo-class :dir
:host-context([dir=rtl]) .ion-float-sm-end -> Unknown pseudo-class :host-context([object Object])
.ion-float-sm-end:dir(rtl) -> Unknown pseudo-class :dir
:host-context([dir=rtl]) .ion-float-md-start -> Unknown pseudo-class :host-context([object Object])
.ion-float-md-start:dir(rtl) -> Unknown pseudo-class :dir
:host-context([dir=rtl]) .ion-float-md-end -> Unknown pseudo-class :host-context([object Object])
.ion-float-md-end:dir(rtl) -> Unknown pseudo-class :dir
:host-context([dir=rtl]) .ion-float-lg-start -> Unknown pseudo-class :host-context([object Object])
.ion-float-lg-start:dir(rtl) -> Unknown pseudo-class :dir
:host-context([dir=rtl]) .ion-float-lg-end -> Unknown pseudo-class :host-context([object Object])
.ion-float-lg-end:dir(rtl) -> Unknown pseudo-class :dir
:host-context([dir=rtl]) .ion-float-xl-start -> Unknown pseudo-class :host-context([object Object])
.ion-float-xl-start:dir(rtl) -> Unknown pseudo-class :dir
:host-context([dir=rtl]) .ion-float-xl-end -> Unknown pseudo-class :host-context([object Object])
.ion-float-xl-end:dir(rtl) -> Unknown pseudo-class :dir
В Chrome устройства, которые мой эмулятор отображает как:
Код: Выделить всё
Remote Target
#LOCALHOST
Android SDK built for x86
#EMULATOR-5554
WebView in io.ionic.starter (61.0.3163.98)
Код: Выделить всё
Warning The key "viewport-fit" is not recognized and ignored.
localhost/:820
SyntaxError: Unexpected token {
cap.handleError.err @ localhost/:820
/polyfills.45b15749fa958a1d.js:1
Uncaught SyntaxError: Unexpected token {
localhost/:820 SyntaxError: Unexpected token {
cap.handleError.err @ localhost/:820
/main.c16a3b803172a61a.js:1
Uncaught SyntaxError: Unexpected token {
Код: Выделить всё
W Attempt to remove non-JNI local reference, dumping thread
W File: https://localhost/ - Line 1298 - Msg: The key "viewport-fit" is not recognized and ignored.
E Style contains key with bad entry: 0x01010586
E [ERROR:gl_surface_egl.cc(289)] eglChooseConfig failed with error EGL_SUCCESS
E File: https://localhost/ - Line 820 - Msg: SyntaxError: Unexpected token {
E File: https://localhost/polyfills.45b15749fa958a1d.js - Line 1 - Msg: Uncaught SyntaxError: Unexpected token {
E JavaScript Error: {"type":"js.error","error":{"message":"Uncaught SyntaxError: Unexpected token {","url":"https://localhost/main.c16a3b803172a61a.js","line":1,"col":11,"errorObject":"{}"}}
E File: https://localhost/ - Line 820 - Msg: SyntaxError: Unexpected token {
E File: https://localhost/main.c16a3b803172a61a.js - Line 1 - Msg: Uncaught SyntaxError: Unexpected token {
Подробнее здесь: https://stackoverflow.com/questions/787 ... n-emulator
Мобильная версия