Where are the lock files of dependencies located in an Android Studio project using Gradle?

1 day ago 3
ARTICLE AD BOX

I am trying to find where the lock files are located on my Gradle in my Kotlin project. I thought that all of them were in the .gradle/cache, but it seems that some of them are moved outside there. I get warnings about lockfiles, probably from stopping a syncing midway.

Example warning:

Unresolved dependencies

Component is the target of multiple version constraints with conflicting requirements:

1.1.0 - from lock file

1.2.0 - transitively via 'androidx.test.espresso:espresso-core:3.7.0' (compile) (1 other path to this version)

Naturally the solution involves just eliminating the lock file from 1.1.0, but I failed to find it anywhere.

Edit 1: As some people are insisting to see the gradle files for some reason, here they are:

Gradle propierties:

org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 android.useAndroidX=true kotlin.code.style=official android.nonTransitiveRClass=true org.gradle.configuration-cache=true org.gradle.parallel=true org.gradle.daemon=true android.uniquePackageNames=false android.dependency.useConstraints=true android.r8.strictFullModeForKeepRules=false android.builtInKotlin=true android.newDsl=true android.generateSyncIssueWhenLibraryConstraintsAreEnabled=true

Gradle kts:

plugins { alias(libs.plugins.android.application) apply false alias(libs.plugins.compose.compiler) apply false }

Settings gradle:

pluginManagement { repositories { google { content { includeGroupByRegex("com\\.android.*") includeGroupByRegex("com\\.google.*") includeGroupByRegex("androidx.*") } } mavenCentral() gradlePluginPortal() } } plugins { id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0" } dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { google() mavenCentral() } } rootProject.name = "App_XXXXXX" include(":app")

Graddle wrapper propierties:

distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists

The toml for good measure:

[versions] agp = "9.0.1" converterGson = "3.0.0" gson = "2.13.2" kotlin = "2.3.10" coreKtx = "1.17.0" junit = "4.13.2" junitVersion = "1.3.0" espressoCore = "3.7.0" lifecycleRuntimeKtx = "2.10.0" activityCompose = "1.12.4" composeBom = "2026.02.01" mapsCompose = "8.2.0" material3 = "1.4.0" navigationCompose = "2.9.7" runtimeLivedata = "1.10.4" compose-icons = "1.7.3" foundation = "1.10.4" roomCommonJvm = "2.8.4" workRuntimeKtx = "2.11.1" [libraries] androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } androidx-work-runtime-ktx = { module = "androidx.work:work-runtime-ktx", version.ref = "workRuntimeKtx" } converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "converterGson" } gson = { module = "com.google.code.gson:gson", version.ref = "gson" } jetbrains-compose-icons-core = { module = "org.jetbrains.compose.material:material-icons-core", version.ref = "compose-icons" } jetbrains-compose-icons-extended = { module = "org.jetbrains.compose.material:material-icons-extended", version.ref = "compose-icons" } androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "navigationCompose" } junit = { group = "junit", name = "junit", version.ref = "junit" } androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" } androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" } androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" } androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" } androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" } androidx-ui = { group = "androidx.compose.ui", name = "ui" } androidx-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" } androidx-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" } androidx-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" } androidx-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" } androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" } androidx-material3 = { group = "androidx.compose.material3", name = "material3" } maps-compose = { module = "com.google.maps.android:maps-compose", version.ref = "mapsCompose" } androidx-runtime-livedata = { group = "androidx.compose.runtime", name = "runtime-livedata", version.ref = "runtimeLivedata" } androidx-compose-foundation = { group = "androidx.compose.foundation", name = "foundation", version.ref = "foundation" } androidx-compose-material3 = { group = "androidx.compose.material3", name = "material3", version.ref = "material3" } androidx-room-common-jvm = { group = "androidx.room", name = "room-common-jvm", version.ref = "roomCommonJvm" } retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "converterGson" } [plugins] android-application = { id = "com.android.application", version.ref = "agp" } compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }

Edit 2: I think i have it zeroed down in 2 options. They are either stored in .gradle\native\ or in .gradle\daemon\X.X.X\registry.bin.lock where X.X.X is the gradle version (9.3.1 in this case).

Read Entire Article