Status Update
Comments
go...@gmail.com <go...@gmail.com> #2
Same problem in gradle:2.2.0-rc2
vi...@gmail.com <vi...@gmail.com> #3
I am facing the same issue.
la...@gmail.com <la...@gmail.com> #4
Too bad they released 2.2 "stable" ignoring this issue.
ia...@gmail.com <ia...@gmail.com> #5
I changed my dependsOn to use `assemble` as `assembleDebug` does not appear to be available at configuration time anymore.
la...@gmail.com <la...@gmail.com> #6
It doesn't work for me. I need this task to run whenever I hit 'run' on Android Studio. If I use 'assemble' instead of 'assembleDebug', it doesn't complain, but it also doesn't work.
ro...@gmail.com <ro...@gmail.com> #7
i got same problem >.<
pi...@gmail.com <pi...@gmail.com> #8
Same issue here. Latest 2.2.
ca...@gmail.com <ca...@gmail.com> #9
Same issue. I updated to 2.2 and it broke.
[Deleted User] <[Deleted User]> #10
Same issue happening for me
be...@gmail.com <be...@gmail.com> #11
Same problem for me.
ha...@gmail.com <ha...@gmail.com> #12
Same problem!!!
pa...@gmail.com <pa...@gmail.com> #13
assembleRelease is also broken.
ps...@gmail.com <ps...@gmail.com> #14
[Comment deleted]
ps...@gmail.com <ps...@gmail.com> #15
I was running into the same issue when updating to 2.2 and updating gradle. I found this fix on stack overflow that seems to be working, though I haven't put it through a lot of paces yet so take it with a grain of salt...
In gradle, I changed all references from:
task findbugs(type: FindBugs, dependsOn: assembleDebug) {
to:
task findbugs(type: FindBugs, dependsOn: "assembleDebug") {
(notice the quotations around "assembleDebug")
For me, the change was in quality.gradle.
Here's the link to the SO post:http://stackoverflow.com/a/38569576/1409132
In gradle, I changed all references from:
task findbugs(type: FindBugs, dependsOn: assembleDebug) {
to:
task findbugs(type: FindBugs, dependsOn: "assembleDebug") {
(notice the quotations around "assembleDebug")
For me, the change was in quality.gradle.
Here's the link to the SO post:
ca...@gmail.com <ca...@gmail.com> #16
Hey PSest, Isn't that backwards?
Your code seems to say that findbugs depends on assembleDebug. I think we want assembleDebug to depend on findbugs.
Your code seems to say that findbugs depends on assembleDebug. I think we want assembleDebug to depend on findbugs.
la...@gmail.com <la...@gmail.com> #17
Exactly, although this might be useful to a lot of people it does not work in this case. We need assembleDebug to dependent on the new task and not the other way around.
te...@gmail.com <te...@gmail.com> #18
[Comment deleted]
ro...@gmail.com <ro...@gmail.com> #19
[Comment deleted]
ro...@gmail.com <ro...@gmail.com> #20
[Comment deleted]
la...@gmail.com <la...@gmail.com> #21
Perfect! Works like a charm!
[Deleted User] <[Deleted User]> #23
[Comment deleted]
la...@gmail.com <la...@gmail.com> #24
mohamed, you shoud at least read issue before commenting
To make things more clear, I've posted a question & answer the make this documented:
http://stackoverflow.com/q/39642141/770467
To make things more clear, I've posted a question & answer the make this documented:
hz...@gmail.com <hz...@gmail.com> #25
Same problem here after upgrading Android studio to 2.2, hence Gradle to 2.2. Thanks for the clarification and workaround, ladoles. It works.
ch...@gmail.com <ch...@gmail.com> #26
couldn't able to found anything like above explained. am migrated from ant to gradle before android studio 2.2 its working fine but now am getting same issue
ad...@gmail.com <ad...@gmail.com> #27
Don't know if this will help anyone else but I was having an issue with:
afterEvaluate {
prepareDebugDependencies.dependsOn(XXXXX)
}
Turns out afterEvaluate {} has been replaced with mode {} and the new format to use is:
model {
tasks.prepareDebugDependencies { dependsOn(XXXXX) }
}
Hope it helps someone.
afterEvaluate {
prepareDebugDependencies.dependsOn(XXXXX)
}
Turns out afterEvaluate {} has been replaced with mode {} and the new format to use is:
model {
tasks.prepareDebugDependencies { dependsOn(XXXXX) }
}
Hope it helps someone.
[Deleted User] <[Deleted User]> #28
Same issue. Getting an error: A problem occurred evaluating project. Could not get unknown property 'assembleDebug' for root project.
xa...@google.com <xa...@google.com>
je...@google.com <je...@google.com>
hu...@google.com <hu...@google.com> #29
Android tasks are typically created in the "afterEvaluate" phase. Starting from 2.2, those tasks also include "assembleDebug" and "assembleRelease". To access such tasks, the user will need to use an afterEvaluate closure:
afterEvaluate {
assembleDebug.dependsOn someTask
}
(Also see comment #4 at https://code.google.com/p/android/issues/detail?id=221024#c4 .)
Change-Id: Iedfbc127ef4fff964e9c2dd615931907630ec1e3
afterEvaluate {
assembleDebug.dependsOn someTask
}
(Also see
Change-Id: Iedfbc127ef4fff964e9c2dd615931907630ec1e3
Description
In our project we have a checktyle tasks that runs whenever we run the project on the IDE. We have a specific gradle file to configure that. Here it is:
apply plugin: 'checkstyle'
check.dependsOn 'checkstyle'
checkstyle {
toolVersion = "7.1"
}
task checkstyle(type: Checkstyle) {
configFile file("${project.rootDir}/config/checkstyle/checks.xml")
configProperties.checkstyleSuppressionsPath = file("${project.rootDir}/config/checkstyle/suppressions.xml").absolutePath
source 'src'
include '**/*.java'
exclude '**/gen/**'
classpath = files()
}
assembleDebug.dependsOn 'checkstyle'
When switching from
AS 2.1.2 / gradle plugin 2.1.2
to
AS 2.2 Beta / gradle plugin 2.2.0-beta1
I get the following error:
Error:Could not get unknown property 'assembleDebug' for project ':app' of type org.gradle.api.Project.