Thanks @mfazio23 for your answer , I founded the error, I was using a code from beta version of the book, so now with the latest version it works, this is the updated code in
build.gradle
:
buildscript {
ext {
kotlin_version = "1.4.30"
nav_version= "2.3.3"
}
// other code
}