Reputation: 118
E/Capacitor/Console: File: http://localhost/ - Line 286 - Msg: SyntaxError: Unexpected token ? E/Capacitor: JavaScript Error: {"type":"js.error","error":{"message":"Uncaught SyntaxError: Unexpected token ?","url":"http://localhost/vendor.js","line":48478,"col":28,"errorObject":"{}"}} E/Capacitor/Console: File: http://localhost/vendor.js - Line 48478 - Msg: Uncaught SyntaxError: Unexpected token ? E/Capacitor/Console: File: http://localhost/ - Line 286 - Msg: SyntaxError: Unexpected token . E/Capacitor: JavaScript Error: {"type":"js.error","error":{"message":"Uncaught SyntaxError: Unexpected token .","url":"http://localhost/main.js","line":1798,"col":26,"errorObject":"{}"}} E/Capacitor/Console: File: http://localhost/main.js - Line 1798 - Msg: Uncaught SyntaxError: Unexpected token .
App works fine on android 12 but not with android 10 (API 29) and below
Capacitor Version
Installed Dependencies:
@capacitor/core: 4.2.0
@capacitor/cli: 4.2.0
@capacitor/android: 4.2.0
@capacitor/ios: Not installed
Platform(s)
Android
Current Behavior
App launches with white screen
Code Reproduction
ionic start
Angular
Tabs
Other Technical Details
npm --version output: 7.24.0
node --version output: v16.10.0
pod --version output : 1.11.3
Additional Context
https://github.com/ionic-team/capacitor/issues/5972
Upvotes: 0
Views: 1312
Reputation: 118
Fixed, 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 es2015.
Change your "target": "es2020" to "target": "es2015", inside tsconfig.json file under compilerOptions.
Please refer https://github.com/ionic-team/capacitor/issues/5972
Upvotes: 3