gpt4 book ai didi

java - 覆盖 build.gradle 中的任务

转载 作者:行者123 更新时间:2023-12-02 01:31:48 25 4
gpt4 key购买 nike

如何覆盖 build.gradle 中的任务?

我尝试使用依赖项 Dynatrace 编译 build.gradle,任务名称之间发生冲突。

Error: Cannot add task ':app:autoInstrumentDebug' as a task with that name already exists.

我已在 build.gradle 菜单上检查了当前任务,但没有找到任何具有此路径名称的任务。

最佳答案

我相信您应该尝试覆盖该任务(确保之后对应用程序进行良好的测试,以避免不必要的副作用)。

为此,您应该执行以下操作:

task(overwrite: true){
apply plugin: 'com.name.of.your.plugin'
plugin {
defaultConfig {

}
}}

希望这对你有帮助, friend !我相信你的同事会为你感到骄傲!

关于java - 覆盖 build.gradle 中的任务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47888573/

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