Status Update
Comments
kd...@google.com <kd...@google.com>
pa...@google.com <pa...@google.com>
an...@nrk.no <an...@nrk.no> #2
Task with name 'lintDebug' not found in project
What kind of project is this? (e.g., an app, library, dynamic-feature, or something else?)
pa...@google.com <pa...@google.com> #3
I see the same issue. It happens on a "com.android.application" (which would make the most sense since the OP reported using the property applicationVariants
)
my exact code is
android {
afterEvaluate {
// Run lint checks on every build
applicationVariants.configureEach {
val lintTask = tasks.named("lint${name.replaceFirstChar(Char::titlecase)}")
assembleProvider.dependsOn(lintTask)
}
}
}
sp...@google.com <sp...@google.com>
sp...@google.com <sp...@google.com> #4
an...@nrk.no <an...@nrk.no> #5
Re #3 and #1, what command results in the error? I don't think it should matter much, because I assume this error occurs during configuration time, but I wasn't able to repro with ./gradlew assembeDebug
or ./gradlew assembleRelease
.
I tried to reproduce the bug with several different versions of AGP and Gradle (using code from #1 and #3), but I wasn't able to reproduce it.
Can you give repro steps or upload a repro project?
an...@google.com <an...@google.com> #6
The project fails to sync. Maybe not ideal but the issue for me was when trying to build this (somewhat complicated) app:
Description
Describe the bug or issue that you're seeing.
We have a project with multiple modules using here . This seems to build just fine when for instance building a regular APK, but linting fails.
apply plugin: 'com.android.library'
. One of these modules (calledanalytics
) needs to use an external AAR file. We have tried to set it up as describedFor instance when we run
lintDebug
we get this error:We don't need the modules to be built as AAR-files, in the end they'll just be part of the final app. But then we assume there's either something missing in the documentation, there is an error with the linting or that we are missing some setup.
A similar issue has been discussed on StackOverflow , but that's for modules that are going to be used as actual libraries in the end - and they are refering to an old method that I guess aren't recommended anymore?
Attach log files from Android Studio
As this most likely isn't an issue with Android Studio (I just weren't allowed to create the issue anywhere else) I don't think this is needed - but let me know if it is!
If you know what they are, write the steps to reproduce:
implementation files(...)
with an AAR-filelintDebug
task or something alike itAdditional information