简体   繁体   中英

Override Task in build.gradle

How to override a task in build.gradle ?

I trying to compile the build.gradle with the dependency Dynatrace , a conflict between task names is occurring.

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

I have checked my current tasks on build.gradle menu and don't have found any task with this path name.

I believe you should try overwriting the task (make sure to test well the App afterwards to avoid unwanted side-effects).

In order to you should do the following:

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

    }
}}

I hope this helps you buddy! I'm sure you're coworkers will be very proud of you!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM