Status Update
Comments
so...@google.com <so...@google.com> #2
Please see
Do you use any Kotlin multi-platform features?
ro...@ta-dah-apps.com <ro...@ta-dah-apps.com> #3
ch...@google.com <ch...@google.com>
je...@google.com <je...@google.com>
so...@google.com <so...@google.com> #4
Do you have anything non-standard in your build configuration related to dependencies? Or do you have any dependencies in a form like project(path: ':foo', configuration: 'bar')
?
ro...@ta-dah-apps.com <ro...@ta-dah-apps.com> #5
ro...@ta-dah-apps.com <ro...@ta-dah-apps.com> #7 Restricted
so...@google.com <so...@google.com> #8
Thank you, I'll double check several things.
so...@google.com <so...@google.com> #9
Is this the configuration in which it doesn't work? Could you also upload a patched one that works?
ro...@ta-dah-apps.com <ro...@ta-dah-apps.com> #10 Restricted
so...@google.com <so...@google.com> #11
Thank you!
Is there any apply plugin: 'com.android.test'
Gradle projects? [EDITED: removed as it is a different problem]
I can also reproduce some NullPointerException
s in Gradle. I'll file issues for both problems.
ro...@ta-dah-apps.com <ro...@ta-dah-apps.com> #12
so...@google.com <so...@google.com> #13
Notes:
This is the exception I get in Chipmunk with AGP 7.2.0 trying to sync the attached project. Surprisingly in studio-main
the same configuration reports an error.
in...@gotinder.com <in...@gotinder.com> #14
hi, we are experiencing same issue. AGP 7.1.x works ok but with AGP 7.2.x Android Studio fails with the same message. Command-line builds works ok.
The simplified configuration is:
flavorDimensions "store", "distribution"
productFlavors {
play {
dimension "store"
}
china {
dimension "store"
}
google {
dimension "distribution"
}
huawei {
dimension "distribution"
}
}
and then we are ignoring the non-local build variants:
def notNeededLocalEnvironment = [
'chinaHuaweiDebug',
'chinaHuaweiRelease',
'chinaGoogleDebug',
'chinaGoogleRelease',
'playHuaweiDebug',
'playHuaweiRelease']
android {
variantFilter { variant ->
def notNeeded = variant.name in notNeededLocalEnvironment
variant.setIgnore(notNeeded)
}
}
The error when trying to sync with AS is:
Cannot find a variant matching build type 'debug' and product flavors '[play]' in :app
However, if we execute a command-line ./gradlew :app:tasks it works.
Same configuration with AGP/AS 7.1 works when we sync the project.
iv...@gotinder.com <iv...@gotinder.com> #15
Hello, we're running into an issue that seems related to this. I've created a simple GitHub repo that allows to reproduce this issue fairly easy. In short, updating from AGP 7.1.3
to 7.2.1
without any changes to our build variant configuration results in gradle sync error, but building the project from the terminal raises no issues.
The specific error we're getting is:
Cannot find a variant matching build type 'debug' and product flavors '[gms]' in :app
I've added details of this in the README of the repo:
mt...@gmail.com <mt...@gmail.com> #16
so...@google.com <so...@google.com> #17
Thank you for the project that reproduces the problem.
so...@google.com <so...@google.com> #18
What causes a problem is a configuration in which a product flavour is completely eliminated by filtering variants.
so...@google.com <so...@google.com>
el...@gmail.com <el...@gmail.com> #19
so...@google.com <so...@google.com> #20
This is an issue in Android Studio and it is triggered by filtering variants in build configuration. It affects Android Studio Chipmunk+ using AGP 7.2+.
Description
The app has 3 flavours listed as "flavorDimensions "model", "cost", "market".
We have another app that has only 2 flavours and this syncs and builds OK. With this in mind I have artificially removed one flavour from the failing app so it reads "flavorDimensions "model", "market", and it will now syncs OK.
Is there perhaps an issue with projects that have more than two flavour dimensions?
Build: AI-212.5712.43.2112.8609683, 202205181650,
AI-212.5712.43.2112.8609683, JRE 11.0.12+0-b1504.28-7817840x64 JetBrains s.r.o., OS Mac OS X(aarch64) v12.4, screens 1920.0x1200.0
AS: Chipmunk | 2021.2.1 Patch 1; Kotlin plugin: 212-1.6.21-release-334-AS5457.46; Android Gradle Plugin: 7.2.1; Gradle: 7.3.3; Gradle JDK: version 11.0.12; NDK: from local.properties: (not specified), latest from SDK: (not found); LLDB: pinned revision 3.1 not found, latest from SDK: (package not found); CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: (not found)
IMPORTANT: Please read