Fixed
Status Update
Comments
uc...@google.com <uc...@google.com>
xa...@google.com <xa...@google.com>
xo...@google.com <xo...@google.com>
xo...@google.com <xo...@google.com> #2
Thanks for the report! I've submitted a fix for this, which should eventually make its way into Android Studio 4.2.
As a temporary workaround, it's possible to outwit the parser, which is erroneously creating a product flavor; instead of
android.productFlavors.whenObjectAdded { ... }
use
(void) { android.productFlavors }().whenObjectAdded { ... }
Thanks once again.
Description
1. create new project
2. add
android.productFlavors.whenObjectAdded { parent ->
}
after android {} in app gradle file
3. go to File->Project Structure -> Suggestions
you will see: Flavor 'whenObjectAdded' has no flavor dimension.
expected: AS should not treat whenObjectAdded as flavor
Build: AI-193.6911.18.40.6626763, 202006250242,
AI-193.6911.18.40.6626763, JRE 1.8.0_242-release-1644-b01x64 JetBrains s.r.o, OS Windows 10(amd64) v10.0 , screens 1920x1080, 1920x1200
AS: 4.0.1; Kotlin plugin: 1.3.72-release-Studio4.0-5; Android Gradle Plugin: 4.0.1; Gradle: 6.1.1; NDK: from local.properties: (not specified), latest from SDK: 21.3.6528147; LLDB: LLDB 3.1 (revision: 3.1.4508709); CMake: from local.properties: (not specified), latest from SDK: 3.10.2, from PATH: (not found)
IMPORTANT: Please read