web-dev-qa-db-fra.com

Ne peut pas ajouter de la tâche 'processdebuggoogleservices' comme une tâche avec ce nom existe déjà

Qu'est-ce qui a mal tourné? org.gradle.api.internal.tasks.defaulttaskcontainer $ DuplicateTaskexception: impossible d'ajouter une tâche 'processdebuggoogleservices' comme une tâche avec ce nom existe déjà .

I want to test firebase FCM plugin, but it seems to have a lot of errors, 
after solved many of them, here what I'm trying to do: ionic cordova build 
Android, I have this error:

enter image description here

info ionique:

enter image description here

platforms\Android\Cordova-Plugin-FCM-AVEC-DEPENDRE-CENDÉCY-MISE À MISE À JOUR:

buildscript {
    repositories {
        mavenCentral()
        jcenter()
        mavenLocal()
        google()
    }
    dependencies {
        classpath 'com.Android.tools.build:gradle:2.3.+'
        classpath 'com.google.gms:google-services:3.1.+'
        classpath 'com.Android.tools.build:gradle:3.0.1'
    }
}
repositories {
    mavenCentral()
    jcenter()
}
dependencies {
    compile 'com.google.firebase:firebase-core:10.+'
}
// apply plugin: 'com.google.gms.google-services'
// class must be used instead of id(string) to be able to apply plugin 
from non-root gradle file
apply plugin: com.google.gms.googleservices.GoogleServicesPlugin

platforms\Android\Cordova-support-google-services

buildscript {
        repositories {
            jcenter()
            mavenCentral()
            google()
        }

dependencies {
    classpath 'com.Android.tools.build:gradle:+'
    classpath 'com.google.gms:google-services:3.2.0'
    classpath 'com.Android.tools.build:gradle:3.0.1'


       }
    }

    // apply plugin: 'com.google.gms.google-services'
    // class must be used instead of id(string) to be able to apply 
plugin from non-root gradle file
ext.postBuildExtras = {
    apply plugin: com.google.gms.googleservices.GoogleServicesPlugin
}
10
bunny

J'ai supprimé {Phonegap-plugin-push ":" 2.2.3 ",} de mon paquet.json.

mon "paquet.json" était ..

{
"name": "TaxMan_v2",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://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.2",
  "@angular/core": "^7.2.2",
  "@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.0.0",
  "@ionic-native/splash-screen": "^5.0.0",
  "@ionic-native/status-bar": "^5.0.0",
  "@ionic/angular": "^4.0.0",
  "@ionic/storage": "^2.2.0",
  "chart.js": "^2.7.3",
  "cordova-Android": "7.1.4",
  "cordova-plugin-device": "2.0.2",
  "cordova-plugin-fcm-with-dependecy-updated": "2.4.0",
  "cordova-plugin-ionic-keyboard": "^2.0.5",
  "cordova-plugin-ionic-webview": "^3.0.0",
  "cordova-plugin-ms-Azure-mobile-apps": "^2.0.2",
  "cordova-plugin-splashscreen": "5.0.2",
  "cordova-plugin-statusbar": "2.4.2",
  "cordova-plugin-whitelist": "^1.3.3",
  "cordova-support-google-services": "1.1.0",
  "core-js": "^2.5.4",
  "phonegap-plugin-multidex": "1.0.0",
  "phonegap-plugin-Push": "2.2.3",
  "rxjs": "~6.3.3",
  "zone.js": "~0.8.29"
},
"devDependencies": {
  "@angular-devkit/architect": "~0.12.3",
  "@angular-devkit/build-angular": "~0.12.3",
  "@angular-devkit/core": "~7.2.3",
  "@angular-devkit/schematics": "~7.2.3",
  "@angular/cli": "~7.2.3",
  "@angular/compiler": "~7.2.2",
  "@angular/compiler-cli": "~7.2.2",
  "@angular/language-service": "~7.2.2",
  "@ionic/angular-toolkit": "~1.2.0",
  "@types/node": "~10.12.0",
  "@types/jasmine": "~2.8.8",
  "@types/jasminewd2": "~2.0.3",
  "codelyzer": "~4.5.0",
  "jasmine-core": "~2.99.1",
  "jasmine-spec-reporter": "~4.2.1",
  "karma": "~3.1.4",
  "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.0.0",
  "tslint": "~5.12.0",
  "TypeScript": "~3.1.6"
},
"description": "An Ionic project",
"cordova": {
  "plugins": {
    "cordova-plugin-whitelist": {},
    "cordova-plugin-statusbar": {},
    "cordova-plugin-device": {},
    "cordova-plugin-splashscreen": {},
    "cordova-plugin-ionic-webview": {},
    "cordova-plugin-ionic-keyboard": {},
    "cordova-plugin-fcm-with-dependecy-updated": {}
  },
  "platforms": [
    "Android"
    ]
  }
}
1
bunny