android - assembleDebug.dependsOn not working -


first of all: not duplicate of

error:could not find property 'assembledebug' on project ':app'

the problem:

since update android studio 2.2 (gradle plugin 2.2) can no longer make task assembledebug or assemblerelease dependent on new task in way:

assembledebug.dependson 'checkstyle'

more details in issue

it gives following error:

error:could not unknown property 'assembledebug' project ':app' of type org.gradle.api.project.

an alternative refer task in following way:

tasks.whentaskadded { task ->     if (task.name == 'assembledebug') {         task.dependson 'checkstyle'     } } 

update

android tasks typically created in "afterevaluate" phase. starting 2.2, tasks include "assembledebug" , "assemblerelease". access such tasks, user need use afterevaluate closure:

    afterevaluate {         assembledebug.dependson sometask  } 

source: https://code.google.com/p/android/issues/detail?id=219732#c32


Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -