gpt4 book ai didi

ionic4 - 无法添加任务 'processDebugGoogleServices',因为具有该名称的任务已存在

转载 作者:行者123 更新时间:2023-12-04 10:06:27 25 4
gpt4 key购买 nike

What went wrong? org.gradle.api.internal.tasks.DefaultTaskContainer$DuplicateTaskException: Cannot add task 'processDebugGoogleServices' as a task with that name already exists.


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

ionic info:



enter image description here

platforms\android\cordova-plugin-fcm-with-dependecy-updated:


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
}

最佳答案

我在插件方面也遇到了一些问题,包括您在上面提到的问题。我的问题是,在删除重复项后,由于某些未知原因,我的platform/android/src/build.gradle具有重复的依赖项(com.google.firebase:firebase-messaging和com.google.firebase:firebase-core)美好的。希望这可以帮助!

关于ionic4 - 无法添加任务 'processDebugGoogleServices',因为具有该名称的任务已存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55844174/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com