Unexpected token ? during run ionic 6 application on android virtual device - android

I get this error:
JavaScript Error: {"type":"js.error","error":{"message":"Uncaught SyntaxError: Unexpected token ?","url":"http://localhost/vendor.js","line":24288,"col":28,"errorObject":"{}"}} File: http://localhost/ - Line 582 - Msg: SyntaxError: Unexpected token ? File: http://localhost/vendor.js - Line 24288 - Msg: Uncaught SyntaxError: Unexpected token ?
when I run the application in the android emulator. And the app does not want to start, just crashes and shows this error in Logcat. I was open that file and this is what I find in that line:
this._baseHref = href ?? this._platformLocation.getBaseHrefFromDOM() ?? (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(DOCUMENT).location?.origin ?? '';
which belongs to this:
class PathLocationStrategy extends LocationStrategy
If helps I can share vendor.js file with you. But please help me or help me to address who is responsible for it.
Here is my package.json:
"dependencies": { "#angular/common": "^14.2.3", "#angular/core": "^14.2.3", "#angular/forms": "^14.2.3", "#angular/platform-browser": "^14.2.3", "#angular/platform-browser-dynamic": "^14.2.3", "#angular/router": "^14.2.3", "#capacitor/android": "^4.3.0", "#capacitor/app": "^4.0.1", "#capacitor/core": "^4.3.0", "#capacitor/filesystem": "^4.1.1", "#capacitor/haptics": "^4.0.0", "#capacitor/ios": "^4.3.0", "#capacitor/keyboard": "^4.0.0", "#capacitor/status-bar": "^4.0.0", "#ionic-native/camera": "^5.36.0", "#ionic-native/core": "^5.36.0", "#ionic-native/file": "^5.36.0", "#ionic-native/splash-screen": "^5.36.0", "#ionic-native/status-bar": "^5.36.0", "#ionic/angular": "^6.2.9", "#ngx-translate/core": "^14.0.0", "#ngx-translate/http-loader": "^7.0.0", "animate.css": "^4.1.1", "cordova-plugin-camera": "^6.0.0", "cordova-plugin-file": "^7.0.0", "date-fns": "^2.29.0", "ionic-selectable": "^4.9.0", "rxjs": "~7.5.7", "tslib": "^2.4.0", "twilio-video": "^2.24.1", "zone.js": "~0.11.8" }, "devDependencies": { "#angular-devkit/architect": "^0.1402.4", "#angular-devkit/build-angular": "^14.2.3", "#angular-devkit/core": "^14.2.4", "#angular-eslint/builder": "~13.3.0", "#angular-eslint/eslint-plugin": "~13.3.0", "#angular-eslint/eslint-plugin-template": "~13.3.0", "#angular-eslint/template-parser": "~13.3.0", "#angular/cli": "^14.2.3", "#angular/compiler": "^14.2.3", "#angular/compiler-cli": "^14.2.3", "#angular/language-service": "^14.2.3", "#capacitor/cli": "^4.0.0", "#ionic/angular-toolkit": "^7.0.0", "#types/jasmine": "~3.6.0", "#types/jasminewd2": "~2.0.3", "#types/node": "^12.11.1", "#typescript-eslint/eslint-plugin": "4.16.1", "#typescript-eslint/parser": "4.16.1", "cordova-plugin-device": "^2.0.2", "cordova-plugin-ionic-keyboard": "^2.2.0", "cordova-plugin-ionic-webview": "^4.2.1", "cordova-plugin-splashscreen": "^5.0.2", "cordova-plugin-statusbar": "^2.4.2", "eslint": "^7.6.0", "eslint-plugin-import": "2.22.1", "eslint-plugin-jsdoc": "30.7.6", "eslint-plugin-prefer-arrow": "1.2.2", "jasmine-core": "~3.8.0", "jasmine-spec-reporter": "~5.0.0", "karma": "~6.3.2", "karma-chrome-launcher": "~3.1.0", "karma-coverage": "~2.0.3", "karma-coverage-istanbul-reporter": "~3.0.2", "karma-jasmine": "~4.0.0", "karma-jasmine-html-reporter": "^1.5.0", "protractor": "~7.0.0", "ts-node": "~10.9.1", "typescript": "~4.8.4" },

Changed in tsconfig.json from:
"target": "es2020",
into:
"target": "es2015",
and looks all works!

Related

Error: Uncaught (in promise): TypeError: n.factory is not a function TypeError: n.factory is not a function

My ionic 6 (angular) app is running as expected on an Android simulator when running in debug mode. However when I generate the aab it gives an error I don't understand. The same happens if I launch the app with ionic cordova run android --prod
main.737916f90481aca1.js:1 ERROR Error: Uncaught (in promise): TypeError: n.factory is not a function
TypeError: n.factory is not a function
at $d.hydrate (main.737916f90481aca1.js:1:455563)
at $d.get (main.737916f90481aca1.js:1:454139)
at $d.get (main.737916f90481aca1.js:1:454187)
at Ay.get (main.737916f90481aca1.js:1:478835)
at _a (main.737916f90481aca1.js:1:437674)
at Da (main.737916f90481aca1.js:1:438151)
at Object.Cs (main.737916f90481aca1.js:1:465938)
at M.component.e.ɵfac [as factory] (4987.e5c5c75110c5e2ce.js:1:3444)
at Vo (main.737916f90481aca1.js:1:439842)
at hy (main.737916f90481aca1.js:1:481079)
at X (polyfills.c13b04107186556f.js:1:17774)
at X (polyfills.c13b04107186556f.js:1:17309)
at polyfills.c13b04107186556f.js:1:18614
at v.invokeTask (polyfills.c13b04107186556f.js:1:8389)
at Object.onInvokeTask (main.737916f90481aca1.js:1:516776)
at v.invokeTask (polyfills.c13b04107186556f.js:1:8310)
at v.runTask (polyfills.c13b04107186556f.js:1:3448)
at A (polyfills.c13b04107186556f.js:1:10775)
Following my package.json
{
"name": "ecove",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "https://ionicframework.com/",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"#angular/common": "^14.2.9",
"#angular/core": "^14.2.9",
"#angular/forms": "^14.2.9",
"#angular/platform-browser": "^14.2.9",
"#angular/platform-browser-dynamic": "^14.2.9",
"#angular/router": "^14.2.9",
"#awesome-cordova-plugins/camera": "^6.1.0",
"#awesome-cordova-plugins/core": "^6.1.0",
"#awesome-cordova-plugins/diagnostic": "^6.1.0",
"#awesome-cordova-plugins/geolocation": "^6.3.0",
"#awesome-cordova-plugins/http": "^6.1.0",
"#awesome-cordova-plugins/in-app-browser": "^6.1.0",
"#awesome-cordova-plugins/network": "^6.1.0",
"#awesome-cordova-plugins/safari-view-controller": "^6.3.0",
"#awesome-cordova-plugins/splash-screen": "^6.3.0",
"#awesome-cordova-plugins/status-bar": "^6.1.0",
"#capacitor/browser": "^4.1.0",
"#capacitor/core": "4.6.1",
"#ionic-native/android-permissions": "^5.36.0",
"#ionic-native/http": "^5.36.0",
"#ionic-native/in-app-browser": "^5.36.0",
"#ionic-native/splash-screen": "^5.36.0",
"#ionic/angular": "^6.4.2",
"#ionic/cordova-builders": "^7.0.0",
"#ionic/core": "^6.4.2",
"#ionic/storage-angular": "^3.0.6",
"#ngx-translate/core": "^14.0.0",
"#ngx-translate/http-loader": "^7.0.0",
"cordova": "^11.1.0",
"cordova-plugin-advanced-http": "^3.3.1",
"cordova-plugin-android-permissions": "^1.1.5",
"cordova-plugin-camera": "^6.0.0",
"cordova-plugin-file": "^7.0.0",
"cordova-plugin-inappbrowser": "^5.0.0",
"cordova-plugin-ionic-keyboard": "^2.2.0",
"cordova-plugin-network-information": "^3.0.0",
"cordova-plugin-splashscreen": "^6.0.2",
"cordova-plugin-statusbar": "^3.0.0",
"cordova-res": "^0.15.4",
"cordova.plugins.diagnostic": "^7.1.1",
"crypto-js": "^4.1.1",
"ionicons": "^6.0.3",
"node-js-marker-clusterer": "^1.0.0",
"rxjs": "~6.6.0",
"swiper": "^8.3.2",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"#angular-devkit/build-angular": "^14.2.9",
"#angular-eslint/builder": "^14.0.0",
"#angular-eslint/eslint-plugin": "^14.0.0",
"#angular-eslint/eslint-plugin-template": "^14.0.0",
"#angular-eslint/template-parser": "^14.0.0",
"#angular/cli": "^14.2.9",
"#angular/compiler": "^14.2.9",
"#angular/compiler-cli": "^14.2.9",
"#angular/language-service": "^14.2.9",
"#capacitor/cli": "4.6.1",
"#ionic/angular-toolkit": "^6.0.0",
"#ionic/lab": "3.2.13",
"#types/jasmine": "~4.0.0",
"#types/jasminewd2": "~2.0.3",
"#types/node": "^12.11.1",
"#typescript-eslint/eslint-plugin": "5.3.0",
"#typescript-eslint/parser": "5.3.0",
"cordova-android": "^10.1.2",
"cordova-plugin-geolocation": "^4.1.0",
"cordova-plugin-ionic-webview": "^5.0.0",
"eslint": "^7.6.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jsdoc": "30.7.6",
"eslint-plugin-prefer-arrow": "1.2.2",
"jasmine-core": "~4.3.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.2.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
"typescript": "~4.8.4"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-statusbar": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-ionic-keyboard": {},
"cordova-plugin-advanced-http": {},
"cordova.plugins.diagnostic": {
"ANDROIDX_VERSION": "1.0.0",
"ANDROIDX_APPCOMPAT_VERSION": "1.3.1"
},
"cordova-plugin-geolocation": {
"GPS_REQUIRED": "true"
},
"cordova-plugin-safariviewcontroller": {},
"cordova-plugin-enable-multidex": {},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-android-permissions": {}
},
"platforms": []
}
}
Any help will be welcomed. Thanks.
I have revised dependencies and all seems to be well configured.

NativeScript - When I am trying to take a build in Android I am getting an Error as below but I can able to take build in IOS

NativeScript - When I am trying to take a build in Android I am getting an Error as below but I can able to take build in IOS.
ERROR in ../node_modules/nativescript-permissions/permissions.js
Module not found: Error: Can't resolve '#master.technology/permissions' in
'/node_modules/nativescript-permissions'
# ../node_modules/nativescript-permissions/permissions.js 13:17-58
# ../node_modules/nativescript-camera/camera.js
# ./app/virtualevent/virtualevent.component.ts
# ./app/app.module.tns.ts
# ./main.tns.ts
Webpack compilation complete.
Executing webpack failed with exit code 2.
The above is the error we are getting when trying to take the Android Build
Environment:
OS: macOS 12.3
CPU: (10) arm64 Apple M1 Pro
Shell: /bin/zsh
node: 14.18.2
npm: 6.14.15
nativescript: 8.1.5
android
java: 17.0.2
ndk: Not Found
apis: Not Found
build_tools: Not Found
system_images: Not Found
ios
xcode: 13.3/13E113
cocoapods: 1.11.2
python: Not Found
python3: 3.8.9
ruby: 2.7.5
platforms:
DriverKit 21.4
iOS 15.4
macOS 12.3
tvOS 15.4
watchOS 8.5
Dependencies:
"dependencies": {
"#angular/animations": "^12.2.5",
"#angular/common": "^12.2.5",
"#angular/compiler": "^12.2.5",
"#angular/core": "^12.2.5",
"#angular/forms": "^12.2.5",
"#angular/http": "~8.0.0-beta.10",
"#angular/platform-browser": "^12.2.5",
"#angular/platform-browser-dynamic": "^12.2.5",
"#angular/router": "^12.2.5",
"#nativescript/theme": "~2.2.1",
"#nstudio/nativescript-checkbox": "^1.0.0",
"base-64": "^1.0.0",
"core-js": "^2.6.9",
"material-ui-search-bar": "^0.4.2",
"nativescript-accordion": "^6.0.0-beta.2",
"nativescript-app-tour-updated": "^2.0.2",
"nativescript-camera": "^4.5.0",
"nativescript-collectionview": "^2.0.36",
"nativescript-danem-drop-down": "^1.0.3",
"nativescript-datetimepicker": "^1.2.2",
"nativescript-email": "^1.6.0",
"nativescript-google-places-autocomplete": "^1.0.3",
"nativescript-imagecropper": "^4.0.0",
"nativescript-imagepicker": "^7.1.0",
"nativescript-iqkeyboardmanager": "^1.5.1",
"nativescript-oauth": "^2.1.8",
"nativescript-oauth2": "^2.4.0",
"nativescript-permissions": "^1.3.9",
"nativescript-plugin-firebase": "^10.5.2",
"nativescript-slides": "^2.3.0",
"nativescript-ui-autocomplete": "^6.0.1",
"nativescript-ui-sidedrawer": "^8.0.1",
"nativescript-websockets": "^1.5.6",
"pusher-nativescript": "^1.0.0",
"reflect-metadata": "~0.1.12",
"rxjs": "~7.3.0",
"rxjs-compat": "^6.5.5",
"tslib": "1.10.0",
"zone.js": "~0.11.4",
"#nativescript/core": "~8.1.1",
"#nativescript/angular": "^12.2.0"
},
"devDependencies": {
"#angular-devkit/build-angular": "^13.2.5",
"#angular/cli": "^12.2.5",
"#angular/compiler-cli": "^12.2.5",
"#nativescript/android": "~8.1.1",
"#nativescript/ios": "~8.1.0",
"#nativescript/schematics": "~1.0.0",
"#nativescript/tslint-rules": "~0.0.5",
"#nativescript/webpack": "~5.0.0",
"#ngtools/webpack": "^13.2.5",
"#types/jasmine": "~3.3.8",
"#types/jasminewd2": "~2.0.3",
"#types/node": "~8.9.4",
"codelyzer": "^5.0.0",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^5.2.3",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"protractor": "^7.0.0",
"sass": "~1.39.0",
"ts-node": "~7.0.0",
"tslint": "~5.15.0",
"typescript": "~4.3.5"
}

Ionic Android App stuck on white screen after upgrading to Angular 12. Error: goog.getLocale is not a function

I recently tried upgrading Angular 11 to 12 in my Ionic App. It all went well, and the app is running with no errors in the browser.
However, when I tried to run it on an Android phone, after the splash-screen disappears, the app gets stuck in a white screen.
I tried using chrone://inspect tool and see if I get any errors and this showed up:
I also get the same error on the Android Logcat: E/Capacitor/Console: File: http://localhost/vendor-es2015.js - Line 15729 - Msg: ERROR TypeError: goog.getLocale is not a function
I tried adding timeout to the splash-screen, updating libraries, deleting node_modules and reinstalling them, but nothing worked. I can't find much info on the web about this error.
Can anyone tell me what this error means or why is the app stuck here? It works well if I go back to Angular 11.
My package.json looks like this:
"dependencies": {
"#agm/core": "^3.0.0-beta.0",
"#angular/common": "~12.2.3",
"#angular/core": "~12.2.3",
"#angular/forms": "~12.2.3",
"#angular/platform-browser": "~12.2.3",
"#angular/platform-browser-dynamic": "~12.2.3",
"#angular/router": "~12.2.3",
"#capacitor-community/background-geolocation": "^0.3.11",
"#capacitor/android": "^2.4.6",
"#capacitor/core": "^2.4.6",
"#capacitor/ios": "^2.4.6",
"#ionic-native/android-permissions": "^5.30.0",
"#ionic-native/clipboard": "^5.31.1",
"#ionic-native/core": "^5.30.0",
"#ionic-native/device": "^5.31.1",
"#ionic-native/diagnostic": "^5.32.1",
"#ionic-native/insomnia": "^5.30.0",
"#ionic-native/launch-navigator": "^5.30.0",
"#ionic-native/location-accuracy": "^5.30.0",
"#ionic-native/market": "^5.33.1",
"#ionic-native/mobile-accessibility": "^5.36.0",
"#ionic-native/splash-screen": "^5.30.0",
"#ionic-native/status-bar": "^5.30.0",
"#ionic/angular": "^5.6.14",
"#ionic/pwa-elements": "^3.0.2",
"#ngrx/effects": "^10.0.0",
"#ngrx/entity": "^10.0.0",
"#ngrx/schematics": "^10.0.0",
"#ngrx/store": "^10.0.0",
"#ngrx/store-devtools": "^10.0.0",
"#ngx-translate/core": "^12.1.2",
"#ngx-translate/http-loader": "^6.0.0",
"agm-direction": "^0.8.9",
"cordova-clipboard": "^1.3.0",
"cordova-plugin-actionsheet": "^2.3.3",
"cordova-plugin-android-permissions": "^1.1.2",
"cordova-plugin-device": "^2.0.3",
"cordova-plugin-dialogs": "^2.0.2",
"cordova-plugin-insomnia": "^4.3.0",
"cordova-plugin-market": "^1.2.0",
"cordova-plugin-network-information": "git+https://github.com/apache/cordova-plugin-network-information.git",
"cordova-plugin-request-location-accuracy": "^2.3.0",
"cordova.plugins.diagnostic": "^6.0.3",
"core-js": "^3.8.3",
"moment": "^2.28.0",
"ngx-signaturepad": "^0.0.9",
"phonegap-plugin-mobile-accessibility": "^1.0.5",
"rxjs": "^6.6.3",
"tslib": "^2.0.1",
"uk.co.workingedge.phonegap.plugin.launchnavigator": "^5.0.5",
"zone.js": "~0.11.4"
},
"devDependencies": {
"#angular-devkit/build-angular": "~12.2.3",
"#angular/cli": "^12.2.3",
"#angular/compiler": "~12.2.3",
"#angular/compiler-cli": "~12.2.3",
"#angular/language-service": "~12.2.3",
"#babel/core": "^7.10.2",
"#capacitor/cli": "2.4.6",
"#ionic/angular-toolkit": "^4.0.0",
"#storybook/addon-actions": "^5.3.19",
"#storybook/addon-knobs": "^5.3.19",
"#storybook/addon-links": "^5.3.19",
"#storybook/addon-notes": "^5.3.19",
"#storybook/addon-options": "^5.3.19",
"#storybook/addons": "^5.3.19",
"#storybook/angular": "^5.3.19",
"#types/googlemaps": "3.39.12",
"#types/jasmine": "~3.3.8",
"#types/jasminewd2": "~2.0.3",
"#types/node": "^12.11.1",
"agm-overlays": "^2.0.0",
"babel-loader": "^8.1.0",
"codelyzer": "^6.0.1",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^6.3.4",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"protractor": "^7.0.0",
"ts-node": "~7.0.0",
"tslint": "~6.1.0",
"typescript": "4.3.5"
},
Thank-you!
#edit 09/2021
as a temporary fix avoid to call the getGlobalLocale().
Add this to your index.html
<script>
var ngI18nClosureMode = false;
</script>
same here updating from angular#12.1 to #12.2.
meanwhile try to update to ^12.1

ERROR in No NgModule metadata found for 'Module' [duplicate]

This question already has answers here:
I have an error when executing ionic serve
(13 answers)
Ionic 2 CSP on android
(1 answer)
Closed 3 years ago.
When building Android App from Ionic4 using "ionic cordova build android"
package.json
{
"name": "campusrides_v2.0",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "https://ionicframework.com/",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"#angular/common": "^7.2.15",
"#angular/core": "^7.2.15",
"#angular/fire": "^5.2.1",
"#angular/forms": "^7.2.2",
"#angular/http": "^7.2.2",
"#angular/platform-browser": "^7.2.2",
"#angular/platform-browser-dynamic": "^7.2.2",
"#angular/router": "^7.2.2",
"#ionic-native/core": "^5.8.0",
"#ionic-native/device": "^5.8.0",
"#ionic-native/fcm": "^5.8.0",
"#ionic-native/geolocation": "^5.8.0",
"#ionic-native/launch-navigator": "^5.15.1",
"#ionic-native/splash-screen": "^5.8.0",
"#ionic-native/status-bar": "^5.8.0",
"#ionic/angular": "^4.5.0",
"#ionic/storage": "^2.2.0",
"angularfire2": "^5.2.1",
"cordova-android": "^8.1.0",
"cordova-plugin-actionsheet": "^2.3.3",
"cordova-plugin-dialogs": "^2.0.2",
"cordova-plugin-fcm-with-dependecy-updated": "^2.4.0",
"cordova-plugin-geolocation": "^4.0.1",
"cordova-sqlite-storage": "^3.2.0",
"core-js": "^2.5.4",
"firebase": "^6.2.0",
"firebase-tools": "^7.0.0",
"firebaseui": "^4.0.0",
"firebaseui-angular": "^3.4.2",
"rxjs": "~6.5.1",
"sharp": "^0.22.1",
"tslib": "^1.10.0",
"uk.co.workingedge.phonegap.plugin.launchnavigator": "^5.0.4",
"zone.js": "~0.8.29"
},
"devDependencies": {
"#angular-devkit/architect": "~0.13.8",
"#angular-devkit/build-angular": "~0.13.8",
"#angular-devkit/core": "~7.3.8",
"#angular-devkit/schematics": "~7.3.8",
"#angular/cli": "~7.3.8",
"#angular/compiler": "~7.2.2",
"#angular/compiler-cli": "~7.2.2",
"#angular/language-service": "~7.2.2",
"#ionic/angular-toolkit": "~1.5.1",
"#ionic/lab": "2.0.4",
"#types/jasmine": "~2.8.8",
"#types/jasminewd2": "~2.0.3",
"#types/node": "^12.0.8",
"codelyzer": "~4.5.0",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-ionic-keyboard": "^2.1.3",
"cordova-plugin-ionic-webview": "^4.1.0",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.4.0",
"ts-node": "~8.1.0",
"tslint": "~5.17.0",
"typescript": "~3.1.6",
"xcode": "^2.0.0"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-geolocation": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-plugin-ionic-keyboard": {},
"cordova-plugin-fcm-with-dependecy-updated": {},
"cordova-sqlite-storage": {},
"uk.co.workingedge.phonegap.plugin.launchnavigator": {
"GOOGLE_API_KEY_FOR_ANDROID": "[-------------------------]",
"OKHTTP_VERSION": "3.12.0",
"LOCATION_USAGE_DESCRIPTION": "This app requires access to your location for navigation purposes"
}
},
"platforms": []
}
}
It gives the following error in the browser console when executing "ionic serve"
Refused to load the image 'http://localhost:8100/favicon.ico' because
it violates the following Content Security Policy directive:
"default-src 'none'". Note that 'img-src' was not explicitly set, so
'default-src' is used as a fallback.
Thanks for your time!

why ttcIndex and fontvariantSetting not found in cordova build?

"dependencies": {
"#angular/animations": "5.2.11",
"#angular/common": "5.2.9",
"#angular/compiler": "5.2.9",
"#angular/compiler-cli": "5.2.9",
"#angular/core": "5.2.9",
"#angular/forms": "5.2.9",
"#angular/http": "5.2.9",
"#angular/platform-browser": "5.2.9",
"#angular/platform-browser-dynamic": "5.2.9",
"#ionic-native/android-permissions": "^4.7.0",
"#ionic-native/app-availability": "^4.20.0",
"#ionic-native/base64": "^4.7.0",
"#ionic-native/camera": "^4.7.0",
"#ionic-native/contacts": "^4.9.1",
"#ionic-native/core": "4.6.0",
"#ionic-native/document-viewer": "^4.12.0",
"#ionic-native/file": "^4.7.0",
"#ionic-native/file-chooser": "^4.7.0",
"#ionic-native/file-opener": "^4.7.0",
"#ionic-native/file-path": "^4.7.0",
"#ionic-native/file-transfer": "^4.7.0",
"#ionic-native/firebase": "^4.7.0",
"#ionic-native/firebase-analytics": "^5.2.0",
"#ionic-native/http": "^4.12.2",
"#ionic-native/in-app-browser": "^4.7.0",
"#ionic-native/keyboard": "^4.12.0",
"#ionic-native/network": "^4.7.0",
"#ionic-native/sim": "^4.20.0",
"#ionic-native/social-sharing": "^4.7.0",
"#ionic-native/splash-screen": "4.6.0",
"#ionic-native/status-bar": "^4.6.0",
"#ionic-native/transfer": "^3.14.0",
"#ionic-native/unique-device-id": "^4.11.0",
"#ionic-native/video-player": "^4.9.0",
"#ionic/pro": "1.0.20",
"#ionic/storage": "2.1.3",
"angular-2-local-storage": "^2.0.0",
"chart.js": "^2.7.2",
"com-badrit-base64": "^0.2.0",
"com.lampa.startapp": "^6.1.6",
"cordova-android": "7.1.4",
"cordova-browser": "^5.0.4",
"cordova-ios": "4.5.5",
"cordova-play-services-version-adapter": "^1.0.2",
"cordova-plugin-advanced-http": "^2.0.6",
"cordova-plugin-analytics": "^2.0.0",
"cordova-plugin-android-permissions": "^1.0.0",
"cordova-plugin-appavailability": "0.4.2",
"cordova-plugin-camera": "^4.0.3",
"cordova-plugin-contacts": "^3.0.1",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-document-viewer": "^0.9.10",
"cordova-plugin-file": "^6.0.1",
"cordova-plugin-file-opener2": "^2.2.0",
"cordova-plugin-file-transfer": "^1.7.1",
"cordova-plugin-filechooser": "^1.2.0",
"cordova-plugin-filepath": "^1.5.1",
"cordova-plugin-firebase": "git+https://github.com/dpa99c/cordova-plugin-firebase.git#GH-1057-April-05-android-build-issue",
"cordova-plugin-firebase-analytics": "^1.0.1",
"cordova-plugin-inappbrowser": "^3.0.0",
"cordova-plugin-ionic-keyboard": "^2.1.3",
"cordova-plugin-ionic-webview": "^2.4.0",
"cordova-plugin-network-information": "^2.0.1",
"cordova-plugin-sim": "1.3.3",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-uniquedeviceid": "^1.3.2",
"cordova-plugin-video-player": "^1.0.1",
"cordova-plugin-whitelist": "^1.3.3",
"cordova-plugin-x-socialsharing": "^5.4.4",
"crypto-js": "^3.1.9-1",
"es6-promise-plugin": "^4.2.2",
"ionic-angular": "3.9.2",
"ionic-plugin-keyboard": "^2.2.1",
"ionic-select-searchable": "^2.3.0",
"ionicons": "3.0.0",
"jquery": "^3.3.1",
"ngx-soap": "^0.2.2-beta6",
"node-sass": "^4.11.0",
"rxjs": "5.5.8",
"sw-toolbox": "3.6.0",
"xml2js": "^0.4.19",
"zone.js": "0.8.20"
},
Issue not solve by adding configure strategy or the plugin for support android.
AAPT: error: resource android:attr/fontVariationSettings not found.
AAPT: error: resource android:attr/ttcIndex not found.
in values.xml file.
and failed linking references. issue
Support library plugin tried,
configuration strategy
This is because on June 17, Google Updated Play Services and Firebase SDK requirements, a quick fix is edit project.properties on platforms/android folder and modify any lines that matches:
com.google.android.gms:play-services-*
and change the version to 11.8.0 to make it work.
Example:
cordova.system.library.5=com.google.android.gms:play-services-auth:+
Change to:
cordova.system.library.5=com.google.android.gms:play-services-auth:11.8.0
And build again.
To make it work this way you should use cordova-android 7 or 8.
Another fix is upgrade the compileSdkVersion to 28.

Categories

Resources