Resolving 'Resolved xxx which is not part of the dependency lock state' Error in ./gradlew build with ./gradlew resolveAndLockAll --write-locks

Tadashi Shigeoka ·  Tue, September 27, 2022

This post introduces how to resolve the “Resolved ‘xxx’ which is not part of the dependency lock state” error in ./gradlew build using ./gradlew resolveAndLockAll —write-locks.

Gradle | グレイドル

Background: Error occurred in ./gradlew build

The following error occurred in ./gradlew build, preventing the build from completing.

Execution failed for task ':application:bootJarMainClassName'.
> Could not resolve all files for configuration ':application:runtimeClasspath'.
   > Resolved 'software.amazon.awssdk:sesv2:2.17.216' which is not part of the dependency lock state

Solution: ./gradlew resolveAndLockAll --write-locks

./gradlew resolveAndLockAll --write-locks

? Official Documentation: Generating and updating dependency locks | Gradle 7.5.1

That’s all about resolving the “Resolved ‘xxx’ which is not part of the dependency lock state” error in ./gradlew build using ./gradlew resolveAndLockAll —write-locks. That’s all from the Gemba.