Status Update
Comments
ju...@google.com <ju...@google.com>
je...@google.com <je...@google.com>
hm...@google.com <hm...@google.com> #2
Bingran, can you please take a look?
From the stacktrace, it seems like the issue is triggered during the native model building (com.android.build.gradle.internal.ide.v2.NativeModelBuilder.buildAll(NativeModelBuilder.kt:104
), and it seems like .kts
build files are used (see prepareKotlinBuildScriptModel
task running).
Nick, does using:
- Android Studio: 2021.3.1 Canary 7
- AGP: 7.1.2
- Gradle: 7.2
also fail?
va...@gmail.com <va...@gmail.com> #3
I can't seem to reproduce the error now, but that may be due to project changes, or perhaps cache invalidation etc fixed it. However, given the error, perhaps there is still a bug there.
I only use build.gradle files, not kts, so any kotlin build files would be internal. However, the app uses Kotlin.
Gradle 7.2 worked with AGP 7.1.2, just 7.4 that had the problem.
hm...@google.com <hm...@google.com> #4
The error is thrown when analytics is queried in NativeModelBuilder
but AnalyticsService
doesn't seem to have been configured which is the reason why we get "no value available" error from AnalyticsService.reconstructProfileBuilder(AnalyticsService.kt:199
. Is is not obvious why AnalyticsService is not configured in a sync build. Due to it cannot be reproduced consistently, I think we should downgrade the priority and upgrade it when we see similar issues.
na...@google.com <na...@google.com> #5
I am running into this error again. Gradle 7.4 or 7.3.3, AGP 7.2.0, AS Dolphin | 2021.3.1 Beta 1. What can I try to resolve it?
ia...@google.com <ia...@google.com> #6
Does it happen consistently? like every time you open the project?
gd...@google.com <gd...@google.com> #7
Yes. I can't resolve it after updating Gradle versions. I think perhaps it was repeatable before I had just reverted the versions.
hm...@google.com <hm...@google.com> #8
I have the same problem and it reproduces the moment I add following lines to the settings.gradle.kts
and try to sync project:
includeBuild("../OtherLibrary") {
dependencySubstitution {
substitute(module("other:Library")).using(project(":library"))
}
}
It seams this crash happens only in "multi-root-project" (composite) projects. Crash doesn't reproduce with AGP 7.1, only with 7.2
Android Studio Chipmunk | 2021.2.1 Patch 1 Build #AI-212.5712.43.2112.8609683, built on May 18, 2022 Gradle Wrapper: gradle-7.3.3-bin.zip AGP: com.android.tools.build:gradle:7.2.1
Description
Coming from https://issuetracker.google.com/issues/244700433 , I changed my build.gradle files to build.gradle.kts and I had the following line:
instead of:
So the android proguard rules weren't loaded which probably caused this.
Would it be possible to warn about this when building using Gradle and potentially throw / fail the build if you're trying to use a proguard file which does not exist?