Colton Idle
02/19/2025, 5:20 PM> IDLE
> IDLE
> IDLE
> IDLE
> IDLE
> :feature:myfeature <===== Each module name seems to go through here iteratively
> IDLE
> IDLE
am i missing something where we could improve the speed of this?
Our gradle.properties is pretty light... but could it be the culprit?
android.userAndroidX=true
org.gradle.daemon=false
org.gradle.jvmargs=-Xmx14g -Xms4g
org.gradle.unsafe.configuration-cache=true
kotlin.daemon.jvmargs=-Xmx4g
David Rubio
02/20/2025, 12:53 PMassemble
task we need about 5Gb for the Gradle daemon and 16Gb for the Kotlin one.
Is there a way to reduce memory consumption?.Colton Idle
02/23/2025, 2:14 PMmisha sha
02/27/2025, 11:52 AMmisha sha
02/27/2025, 11:53 AMColton Idle
02/28/2025, 3:03 PM./gradlew spotlessApply
I've been doing some experimenting and researching and it looks like everyone does it differently.
NowInAndroid (which I use as a good resource for how things should be setup) weird uses an init.gradle.kts file?
gradle team repo fork:
https://github.com/gradle/nowinandroid/blob/main-declarative/gradle/init.gradle.kts
original android repo:
https://github.com/android/nowinandroid/blob/main/gradle/init.gradle.kts
Can anyone explain what's actually going on here and maybe what the best way to setup spotless is in an android project (spotless docs dont really have great info in regards to android [and it can't even pickup android src sets properly by default])Igor Wojda
03/03/2025, 3:48 PMcom.android.compose.screenshot
plugin as dependency. Idea is for my custom plugin to be located inside buildSrc
(Gradle Kotlin DSL) and serve as base configuration for screenshot testing, however Gradle complains that:
Please enable screenshotTest source set first to apply the screenshot test plugin.
Add "android.experimental.enableScreenshotTest=true" to gradle.properties
The android.experimental.enableScreenshotTest=true property is added to root build.gradle.kts file however it seems like it's not available inside buildSrc - any idea on how to fix this?
It looks like these plugins are aplied instantly when I add implementation(plugin(libs.plugins.composeScreenshot))
to buildSrc\settings.gradle.kts
Perhaps I am applying these plugins in wrong way (or gradle.properties are not evaluated in time)
Any ideas on how to fix this?
Config:
`buildSrc\settings.gradle.kts`:
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
}
versionCatalogs {
create("libs") {
from(files("../gradle/libs.versions.toml"))
}
}
}
buildSrc\build.gradle.kts
import org.gradle.kotlin.dsl.`kotlin-dsl`
import java.util.Properties
plugins {
`kotlin-dsl`
}
repositories {
google()
mavenCentral()
}
dependencies {
implementation(plugin(libs.plugins.android.application))
implementation(plugin(libs.plugins.android.library))
implementation(plugin(libs.plugins.compose.compiler))
implementation(plugin(libs.plugins.composeScreenshot))
}
fun plugin(plugin: Provider<PluginDependency>) = plugin.map { "${it.pluginId}:${it.pluginId}.gradle.plugin:${it.version}" }
`gradle\libs.versions.toml`:
[plugins]
android-application = { id = "com.android.application", version.ref = "androidPlugin" }
android-library = { id = "com.android.library", version.ref = "androidPlugin" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
composeScreenshot = { id = "com.android.compose.screenshot", version.ref = "screenshot" }
David Rubio
03/06/2025, 8:57 AMtestDebugUnitTest
in modules that don't have flavors. But it doesn't do that for modules that have flavors.
We have dozens of flavors (each one is a customization for a client) that share 99% of the code, but have some little differences in code and dependencies. And we have tests specific to a flavor in src/testFlavor1
, src/testFlavor2
, etc. We'd like to create a test task that runs all the tests for the current module and integrates well with the IDE (so it has to be of type AndroidUnitTest
, but correct me if I'm wrong). So basically we want to create a testDebugUnitTest
for these modules with flavors.
How to do that?Mark
03/07/2025, 6:21 AMGenerate Signed APK…
I get:
> Task :app:minifyReleaseWithR8
AGPBI: {"kind":"error","text":"java.lang.UnsupportedOperationException: Operation is not supported for read-only collection","sources":[{}],"tool":"R8"}
java.lang.UnsupportedOperationException: Operation is not supported for read-only collection
If I revert back to 8.8.2, then the issue goes away.Andrew Grosner
03/12/2025, 4:57 PMDavid A.
03/20/2025, 11:41 AMandroid.packaging.resources.excludes.add("META-INF/services/**")
...)
§§§Execution failed for task ':app:mergeDebugUnitTestJavaResource'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction
> 2 files found with path 'META-INF/services/kotlinx.coroutines.CoroutineExceptionHandler' from inputs:
- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.1/kotlinx-coroutines-android-1.10.1.jar
- org.jetbrains.kotlinx:kotlinx-coroutines-test-jvm:1.10.1/kotlinx-coroutines-test-jvm-1.10.1.jar
Utsav Hingar
03/26/2025, 6:33 AMCould not resolve all files for configuration 'appdevDebugRuntimeClasspath'.> Could not resolve ai.digitapsync sdk5.1.7. Required by: project :app > Could not resolve ai.digitapsync sdk5.1.7. > Could not get resource 's3://digitap-sync-sdk.s3.amazonaws.com/ai/digitap/sync-sdk/5.1.7/sync-sdk-5.1.7.pom'. > The AWS Access Key Id you provided does not exist in our records. (Service: Amazon S3; Status Code: 403; Error Code: InvalidAccessKeyId; Request ID: AJMMYR6384PX0ZYM; S3 Extended Request ID: Sd5CQTCxJHmwQcxFbwN5UVzwdT7KJ4Y5IFHUtiN7EZX4pqonsqt76uTt7Yc6KRDhb7oppx7UBLjBgOHJ4eopLA==; Proxy: null) * 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.* Get more help at https://help.gradle.org BUILD FAILED in 31s Exception: Gradle task assembleDebug failed with exit code 1 Output of flutter doctor -v [✓] Flutter (Channel stable, 3.3.10, on macOS 15.3.2 24D81 darwin-arm, locale en-IN) • Flutter version 3.3.10 on channel stable at /Users/utsavhingar/Downloads/development/flutter_3.3.10 • Upstream repository https://github.com/flutter/flutter.git • Framework revision 135454af32 (2 years, 3 months ago), 2022-12-15 073655 -0800 • Engine revision 3316dd8728 • Dart version 2.18.6 • DevTools version 2.15.0 [✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0) • Android SDK at /Users/utsavhingar/Library/Android/sdk • Platform android-36, build-tools 36.0.0 • Java binary at: /opt/homebrew/Cellar/openjdk@17/17.0.14/libexec/openjdk.jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment Homebrew (build 17.0.14+0) • All Android licenses accepted. [!] Xcode - develop for iOS and macOS (Xcode 16.2) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 16C5032a ✗ CocoaPods not installed. CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side. Without CocoaPods, plugins will not work on iOS or macOS. For more info, see https://flutter.dev/platform-plugins To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions. [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [!] Android Studio (version 2024.3) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart ✗ Unable to find bundled Java version. • Try updating or re-installing Android Studio. [✓] VS Code (version 1.98.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.106.0 [✓] Connected device (3 available) • sdk gphone16k arm64 (mobile) • emulator-5554 • android-arm64 • Android 16 (API 36) (emulator) • macOS (desktop) • macos • darwin-arm64 • macOS 15.3.2 24D81 darwin-arm • Chrome (web) • chrome • web-javascript • Google Chrome 134.0.6998.118 [✓] HTTP Host Availability • All required HTTP hosts are available ! Doctor found issues in 2 categories. Output of the ./gradlew -v ------------------------------------------------------------ Gradle 7.4 ------------------------------------------------------------ Build time: 2022-02-08 095838 UTC Revision: f0d9291c04b90b59445041eaa75b2ee744162586 Kotlin: 1.5.31 Groovy: 3.0.9 Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021 JVM: 17.0.14 (Homebrew 17.0.14+0) OS: Mac OS X 15.3.2 aarch64
Mr Ahmed Selim
03/29/2025, 9:57 PMRun 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.* Get more help at https://help.gradle.org BUILD FAILED in 10m 4s
Nadav Gampel
03/31/2025, 1:24 PM* Where:
Build file '/basic-android-kotlin-compose-training-inventory-app/build.gradle.kts' line: 24
* What went wrong:
Plugin [id: 'com.android.application', version: '8.1.4', apply: false] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Included Builds (No included builds contain this plugin)
- Plugin Repositories (could not resolve plugin artifact 'com.android.application:com.android.application.gradle.plugin:8.1.4')
what is the problem?Louis Jacomet
04/08/2025, 8:45 AMJay-Alexander Elliot
04/25/2025, 1:13 AMSimon Hafner
05/06/2025, 1:09 PMAdrian Tache
05/12/2025, 3:18 PMVishwanth Prakash
05/31/2025, 12:02 PMWARNING: The following problems were found when resolving the SDK location:
101
Where: ANDROID_SDK_ROOT environment variable. Problem: Directory does not exist
Vishwanth Prakash
06/02/2025, 6:37 AMDon Phillips
06/24/2025, 6:24 PMfirebaseAppDistribution
block at the project level for config common to all build variants, but also override stuff at the buildType/productFlavor level.
I see that the app distribution plugin provides the following 3 extensions:
package com.google.firebase.appdistribution.gradle
public fun com.android.build.api.dsl.ProductFlavor.firebaseAppDistribution(action: com.google.firebase.appdistribution.gradle.AppDistributionExtension.() -> kotlin.Unit): kotlin.Unit { /* compiled code */ }
public fun org.gradle.api.Project.firebaseAppDistribution(action: com.google.firebase.appdistribution.gradle.AppDistributionExtension.() -> kotlin.Unit): kotlin.Unit { /* compiled code */ }
public fun org.gradle.nativeplatform.BuildType.firebaseAppDistribution(action: com.google.firebase.appdistribution.gradle.AppDistributionExtension.() -> kotlin.Unit): kotlin.Unit { /* compiled code */ }
I've got this at the top of my build script per the instructions and the linter error:
import com.google.firebase.appdistribution.gradle.firebaseAppDistribution
But only the extension on org.gradle.api.Project
seems to resolve. When I add a firebaseAppDistribution
block to my release
buildType, I still get a red squiggly.
I'm on pretty much the most recent versions of everything.
So far, this is all I've found on the topic - https://medium.com/@anthony_m_cannon/android-firebase-app-distribution-for-multiple-build-types-4b50ff751ef0 and it pretty much seems like the author couldn't figure it out, so he worked around it by specifying an env-var in CI so he could pick the right one at the Project level block. But this seems wrong.
But maybe the plugin is wrong? My release buildType block's type is org.gradle.api.NamedDomainObjectContainer<com.android.build.api.dsl.ApplicationBuildType>
which is definitely NOT org.gradle.nativeplatform.BuildType
Ardit Qerimi
07/10/2025, 7:49 AMnpm run android
. The build fails with the following error:
Execution failed for task ':app:checkDebugAarMetadata'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
> 2 issues were found when checking AAR metadata:
1. Dependency 'androidx.core:core:1.16.0' requires Android Gradle plugin 8.6.0 or higher.
2. Dependency 'androidx.core:core-ktx:1.16.0' requires Android Gradle plugin 8.6.0 or higher.
My current setup:
• O*penJDK:*
• 17.0.15 (2025-04-15 LTS)
• Gradle: 8.3
• Android Gradle Plugin (AGP): 8.2.1
• compileSdk: 35Faid Alagbe
07/11/2025, 9:36 AMFaid Alagbe
07/11/2025, 9:36 AMA failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction> Android resource linking failed aapt2.exe E 07-11 112826 25748 29600 LoadedArsc.cpp:94] RES_TABLE_TYPE_TYPE entry offsets overlap actual entry data. aapt2.exe E 07-11 112826 25748 29600 ApkAssets.cpp:149] Failed to load resources table in APK 'C:\Users\HP Elitebook\AppData\Local\Android\sdk\platforms\androi d-35\android.jar'. error: failed to load include path C:\Users\HP Elitebook\AppData\Local\Android\sdk\platforms\android-35\android.jar. * 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.============================================================================== 2: Task failed with an exception. ----------- * What went wrong: Execution failed for task 'appbundleReleaseResources'.
A failure occurred while executing com.android.build.gradle.internal.res.Aapt2ProcessResourcesRunnable> Android resource linking failed aapt2.exe E 07-11 112826 21836 29372 LoadedArsc.cpp:94] RES_TABLE_TYPE_TYPE entry offsets overlap actual entry data. aapt2.exe E 07-11 112826 21836 29372 ApkAssets.cpp:149] Failed to load resources table in APK 'C:\Users\HP Elitebook\AppData\Local\Android\sdk\platforms\androi d-35\android.jar'. error: failed to load include path C:\Users\HP Elitebook\AppData\Local\Android\sdk\platforms\android-35\android.jar. * 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.============================================================================== * Get more help at https://help.gradle.org BUILD FAILED in 2m 2s Running Gradle task 'assembleRelease'... 123,8s Gradle task assembleRelease failed with exit code 1
Vareli Tecsoft
07/16/2025, 7:48 AMRun with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.* Exception is: org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'com.android.application', version: '8.2', apply: false] was not found in any of the following sources: - Gradle Core Plugins (plugin is not in 'org.gradle' namespace) - Plugin Repositories (could not resolve plugin artifact 'com.android.applicationcom.android.application.gradle.plugin8.2')
Brandon Mwakasege
07/21/2025, 1:12 PMRun with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.* Exception is: org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'com.android.application', version: '8.11.1', apply: false] was not found in any of the following sources: - Gradle Core Plugins (plugin is not in 'org.gradle' namespace) - Included Builds (No included builds contain this plugin) - Plugin Repositories (could not resolve plugin artifact 'com.android.applicationcom.android.application.gradle.plugin8.11.1') Searched in the following repositories: Google MavenRepo Gradle Central Plugin Repository
Mohammed Mahmood Ahmed
07/27/2025, 3:54 PMAndrzej Zabost
07/30/2025, 12:10 PMw: [ksp] Schema export directory was not provided to the annotation processor so Room cannot export the schema. You can either provide `room.schemaLocation` annotation processor argument by applying the Room Gradle plugin (id 'androidx.room') OR set exportSchema to false.
depending on how the plugin is applied?
---
Method 1 (everything is fine, schema is generated, no warnings)
libs.versions.toml
[versions]
room = "2.7.2"
[plugins]
room = { id = "androidx.room", version.ref = "room" }
app/build.gradle.kts
plugins {
// ...
alias(libs.plugins.room)
}
android {
room {
schemaDirectory("$projectDir/schemas")
}
}
---
Method 2 (doesn't work, "_Schema export directory was not provided ..._")
[versions]
room = "2.7.2"
[libraries]
room-plugin = { module = "androidx.room:room-gradle-plugin", version.ref = "room" }
[plugins]
room = { id = "androidx.room" } // no version here
build.gradle.kts
(root project)
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath(libs.room.plugin)
}
}
app/build.gradle.kts
(no changes - same as before)
plugins {
// ...
alias(libs.plugins.room)
}
android {
room {
schemaDirectory("$projectDir/schemas")
}
}
Andrew Grosner
08/01/2025, 2:57 PMAsehinde Juwon
08/08/2025, 2:09 PM* What went wrong:
Execution failed for task ':app:compileReleaseKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
> Compilation error. See log for more details
* 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.
> Get more help at <https://help.gradle.org>.
BUILD FAILED in 5m 47s
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.