I’m using Ionic version 7.2.0, npm version 10.8.2, angular 18.1.1, node 20.16.0, Capacitor version 6.1.1, phone api 27, windows 11 64 bits, jdk-17 (I had to install and uninstall several java versions because it kept giving me compatibility erros, besides changing enviroment variables).
I created a basic ionic project with ionic start
, and angular. Then I ran ng build
, followed by npx cap copy
, npx cap sync
,ionic capacitor add android
and ionic capacitor run android
.
When i do this, it doesnt show any errors on the CLI, but the emulator shows the app as a blank screen.
I have created other apps on android studio and the emulator usually works fine. When i open chrome://inspect/#devices
or with the android app directly in android studio using also ionic capacitor build android
, the logcat shows small javascript errors like SyntaxError: Unexpected token {
When running the app regularly in the browser with ionic serve
it works fine.
Whats going on?