Capacitor Android Build not running in emulator

Im running into a strange problem where my app wont run in the android emulator so I created a brand new app with the latest version of Capacitor. The app build and deploys fine, but when it runs it goes to a blank white screen below is what it logs out in Android Studio. Any thought on how to fix this?

D/Capacitor: Handling local request: http://localhost/styles.css
D/Capacitor: Handling local request: http://localhost/runtime.js
D/Capacitor: Handling local request: http://localhost/polyfills.js
D/Capacitor: Handling local request: http://localhost/vendor.js
D/Capacitor: Handling local request: http://localhost/main.js
E/Capacitor/Console: File: http://localhost/ - Line 287 - Msg: SyntaxError: Unexpected token .
E/Capacitor: JavaScript Error: {“type”:“js.error”,“error”:{“message”:“Uncaught SyntaxError: Unexpected token .”,“url”:“http://localhost/vendor.js",“line”:22300,“col”:38,“errorObject”:"{}”}}
E/Capacitor/Console: File: http://localhost/vendor.js - Line 22300 - Msg: Uncaught SyntaxError: Unexpected token .
D/Capacitor: Handling local request: http://localhost/assets/icon/favicon.png

Capacitor has a minimum WebView version of 60. Verify that your emulator has at least WebView 60. If it is above WebView 60, verify all of your syntax works on your version with something like caniuse.com

1 Like

angular, by default, only supports latest 2 android versions, if you want to support older versions you have to configure your app to compile to es5

This note on Ionic docs talks about iOS 13, but will also help you with some old Android versions that use old Chrome versions on the emulator

That worked! Thanks!