Gradle dependencies available in lock file but throw error during build

  Kiến thức lập trình

I am developing a Kotlin project using gradlew on IntelliJ. When I build the project using gradlew build, I receive an unresolved reference error. When I lock the dependencies using gradlew lockdown, the dependency shows up in the lock file, and the build executes smoothly.

I do not find this entirely strange, but do not know the exact reason(s) of its occurence.

What could be the possible cause(s) for this? Could it be that compilation process must occur in some order, and when the process reaches the file where dependency error is thrown, the dependency might not be yet, but might become avilable later in the compile process? I would greatly appreciate any references where I could understand the process better for both build and lockdown commands.

Many Thanks!

New contributor

TFJ is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.