I am trying to use push notifications ( firebase cloud messages), following this tutorial (here),
I have installed the plugin ( ionic cordova plugin add cordova-plugin-fcm-with-dependecy-updated, then npm install @ionic-native/fcm) then tried ionic cordova run android. And faced the following error:
Task :app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILEDD8: Cannot fit requested classes in a single dex file (# methods: 106004 > 65536)
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:app:transformDexArchiveWithExternalLibsDexMergerForDebug’.
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
The number of method references in a .dex file cannot exceed 64K.
Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html
BUILD FAILED in 35s
36 actionable tasks: 36 executed
E:\Projects\DeliveryFamily-11-4-2020-START\platforms\android\gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
D8: Cannot fit requested classes in a single dex file (# methods: 106004 > 65536)
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:app:transformDexArchiveWithExternalLibsDexMergerForDebug’.
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
The number of method references in a .dex file cannot exceed 64K.
Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html
BUILD FAILED in 35s
And this is my package.json file:
"dependencies": {
"@angular/common": "~8.1.2",
"@angular/compiler": "~8.1.2",
"@angular/core": "~8.1.2",
"@angular/fire": "^5.2.3",
"@angular/forms": "~8.1.2",
"@angular/platform-browser": "~8.1.2",
"@angular/platform-browser-dynamic": "~8.1.2",
"@angular/router": "~8.1.2",
"@capacitor/core": "1.2.1",
"@ionic-native/camera": "^5.16.0",
"@ionic-native/clipboard": "^5.22.0",
"@ionic-native/core": "^5.16.0",
"@ionic-native/crop": "^5.16.0",
"@ionic-native/facebook": "^5.23.0",
"@ionic-native/fcm": "^5.23.0",
"@ionic-native/file": "^5.23.0",
"@ionic-native/file-path": "^5.16.0",
"@ionic-native/firebase": "^5.22.0",
"@ionic-native/globalization": "^5.0.0",
"@ionic-native/google-plus": "^5.23.0",
"@ionic-native/image-picker": "^5.16.0",
"@ionic-native/ionic-webview": "^5.16.0",
"@ionic-native/splash-screen": "^5.16.0",
"@ionic-native/status-bar": "^5.16.0",
"@ionic/angular": "^4.11.5",
"@ionic/storage": "^2.2.0",
"@ngrx/effects": "^8.5.1",
"@ngrx/entity": "^8.5.1",
"@ngrx/store": "^8.5.1",
"@ngx-translate/core": "^12.1.2",
"@ngx-translate/http-loader": "^4.0.0",
"angularfire": "^2.3.0",
"cordova-android": "^8.1.0",
"cordova-clipboard": "^1.3.0",
"cordova-plugin-androidx": "^1.0.2",
"cordova-plugin-androidx-adapter": "^1.1.0",
"cordova-plugin-browsertab": "^0.2.0",
"cordova-plugin-buildinfo": "^4.0.0",
"cordova-plugin-camera": "^4.1.0",
"cordova-plugin-compat": "^1.2.0",
"cordova-plugin-crop": "^0.4.0",
"cordova-plugin-customurlscheme": "^5.0.1",
"cordova-plugin-facebook4": "^6.4.0",
"cordova-plugin-fcm-with-dependecy-updated": "^4.6.1",
"cordova-plugin-file": "^6.0.2",
"cordova-plugin-filepath": "^1.5.6",
"cordova-plugin-firebasex": "^9.0.2-cli",
"cordova-plugin-globalization": "^1.11.0",
"cordova-plugin-googleplus": "8.4.0",
"cordova-plugin-inappbrowser": "^3.2.0",
"cordova-plugin-ionic-webview": "^4.1.3",
"cordova-plugin-telerik-imagepicker": "^2.3.3",
"cordova-sqlite-storage": "^5.0.0",
"cordova-universal-links-plugin": "^1.2.1",
"cordova-universal-links-plugin-fix": "^1.2.1",
"core-js": "^2.6.10",
"firebase": "^6.6.2",
"ngx-clipboard": "^12.3.0",
"promise-polyfill": "8.1.3",
"rxjs": "^6.5.3",
"tslib": "^1.9.0",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/architect": "~0.801.2",
"@angular-devkit/build-angular": "^0.803.24",
"@angular-devkit/core": "~8.1.2",
"@angular-devkit/schematics": "~8.1.2",
"@angular/cli": "~8.1.2",
"@angular/compiler": "~8.1.2",
"@angular/compiler-cli": "~8.1.2",
"@angular/language-service": "~8.1.2",
"@capacitor/cli": "1.2.1",
"@ionic/angular-toolkit": "~2.0.0",
"@types/jasmine": "~3.3.8",
"@types/jasminewd2": "^2.0.8",
"@types/node": "~8.9.4",
"codelyzer": "^5.2.0",
"cordova-plugin-device": "^2.0.3",
"cordova-plugin-ionic-keyboard": "^2.2.0",
"cordova-plugin-splashscreen": "^5.0.3",
"cordova-plugin-statusbar": "^2.4.3",
"cordova-plugin-whitelist": "^1.3.4",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^4.4.1",
"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",
"node-sass": "^4.13.1",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.15.0",
"typescript": "~3.4.3"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-camera": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
},
"cordova-plugin-filepath": {},
"cordova-plugin-telerik-imagepicker": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-keyboard": {},
"cordova-plugin-globalization": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-clipboard": {},
"cordova-plugin-crop": {},
"cordova-sqlite-storage": {},
"cordova-plugin-file": {},
"cordova-plugin-facebook4": {
"APP_ID": "1145978773456127",
"APP_NAME": "The-Family-Delivery",
"FACEBOOK_HYBRID_APP_EVENTS": "false",
"FACEBOOK_ANDROID_SDK_VERSION": "5.13.0"
},
"cordova-plugin-buildinfo": {},
"cordova-plugin-browsertab": {},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-customurlscheme": {
"URL_SCHEME": "........", // here email
"ANDROID_SCHEME": " ",
"ANDROID_HOST": " ",
"ANDROID_PATHPREFIX": "/"
},
"cordova-plugin-googleplus": {
"REVERSED_CLIENT_ID": ".........", //here the id
"PLAY_SERVICES_VERSION": "15.0.1"
},
"cordova-plugin-fcm-with-dependecy-updated": {
"FCM_VERSION": "19.0.0",
"GRADLE_TOOLS_VERSION": "3.5.3",
"GOOGLE_SERVICES_VERSION": "4.3.3",
"SUPPORT_LIBRARY_VERSION": "28.0.0",
"ANDROID_DEFAULT_NOTIFICATION_ICON": "@mipmap/ic_launcher"
},
"cordova-plugin-androidx": {},
"cordova-plugin-androidx-adapter": {},
"cordova-plugin-firebasex": {},
"cordova-universal-links-plugin": {}
},
"platforms": [
"android"
]
}
}
I have tried this solution: here, but i dont know what to do with the curl command, not found.
I am new to ionic. Please show me a step by step solution to follow.
Thank u in advance.