Ky
11/04/2022, 5:07 PMUnable to load class 'com.android.build.gradle.internal.api.InstallableVariantImpl'.
This is an unexpected error. Please file a bug containing the idea.log file.
This error only occurs when trying to upload variants that declare artifactType = "AAB"
.
The only dependency change is adding
implementation("com.google.firebase:firebase-appdistribution-gradle:2.1.3")
to buildSrc/build.gradle.kts.
app/build.gradle.kts still configures productFlavors distribution properties as it did before when it was working without a problem.Vampire
11/04/2022, 7:44 PMidea.log
in your message makes me think you have an IDE issue.Ky
11/04/2022, 7:46 PMKy
11/04/2022, 7:46 PMVampire
11/04/2022, 7:56 PMKy
11/04/2022, 7:57 PMClassNotFoundException: com.android.build.gradle.internal.api.InstallableVariantImpl
Ky
11/04/2022, 7:58 PMartifactType = "AAB"
Vampire
11/04/2022, 8:02 PMKy
11/04/2022, 8:18 PMClassNotFoundException
is because that was the error output when looking higher in the treeKy
11/04/2022, 8:19 PM> Task :android:app:appDistributionUploadMyVariant-prodRelease FAILED
Execution failed for task ':android:app:appDistributionUploadMyVariant-prodRelease'.
> java.lang.ClassNotFoundException: com.android.build.gradle.internal.api.InstallableVariantImpl
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
Vampire
11/04/2022, 8:20 PMVampire
11/04/2022, 8:20 PM--stacktrace
or optimally you could provide a build scanKy
11/04/2022, 8:21 PMVampire
11/04/2022, 8:21 PMVampire
11/04/2022, 8:22 PMVampire
11/04/2022, 8:22 PMKy
11/04/2022, 8:22 PMKy
11/04/2022, 8:23 PMVampire
11/04/2022, 8:25 PMVampire
11/04/2022, 8:26 PMVampire
11/04/2022, 8:26 PMVampire
11/04/2022, 8:26 PMKy
11/04/2022, 9:13 PMorg.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during IR lowering
The root cause java.lang.RuntimeException was thrown at: org.jetbrains.kotlin.backend.jvm.codegen.FunctionCodegen.generate(FunctionCodegen.kt:50)
This is some issue with inlining Jetpack Compose code in one of the app modules and requires the Kotlin gradle plugin to then also be added to buildSrc. This introduces more complications..
I'm moving the DistributionTask back to app-level for now as there doesn't seem to be a straightforward way to achieve what I was going for.
I guess some point inside UploadDistributionTask.getAabPath(AppDistributionProperties param1)
,(I can't decompile implementation) there is a call to AGP class whereas UploadDistributionTask.getApkPath(AppDistributionProperties param1)
must not call that AGP class. But that seems strange as the class name in question does not strike me as something unique to AAB vs APK. blob shrug
Thanks for your input