title: Kotlin NavArgs unresolved reference issue
body: <p>I have a question. In my application, I used structures as I mentioned below. However, the code blog I marked does not work. It sees imdbId as unresolved reference. Despite my research, I could not find the solution. I would appreciate if you are interested.I think there is no problem algorithmically. I think there may be more library or gradle incompatibility. If there is something missing, I can add them</p>
  <blockquote>
  <p>Details Fragment.kt</p>
  </blockquote>
  <pre><code>    lateinit var binding:FragmentDetailsBinding
          val viewModel:MovieViewModel by viewModels()
  val args :DetailsFragmentArgs by navArgs()
      
  override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
  
          binding.backPress.setOnClickListener {
              findNavController().popBackStack()
          }
  
          viewModel.getMovieDetails(args.imdbId!!)  //-&gt;&gt;&gt;&gt;imdbId unresolved reference that's problem.
  
  
          viewModel.movieDetails.observe(viewLifecycleOwner){
              when(it.getContentIfNotHandled()?.status){
                  Status.LOADING-&gt;{
  
                      binding.detailsProgress.visibility=View.VISIBLE
                  }
                  Status.ERROR-&gt;{
  
                      binding.detailsProgress.visibility=View.GONE
                  }
                  Status.SUCCESS-&gt;{
                      binding.detailsProgress.visibility=View.GONE
  
                      binding.movieDetails=it.peekContent().data
                  }
              }
          val args :DetailsFragmentArgs by navArgs()
  </code></pre>
  <blockquote>
  <p><strong>Build.Gradle</strong></p>
  </blockquote>
  <pre><code>buildscript {
  
      repositories {
          google()
          mavenCentral()
      }
      dependencies {
          classpath &quot;com.android.tools.build:gradle:7.0.3&quot;
          classpath &quot;com.google.gms:google-services:4.3.10&quot;
          classpath &quot;org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31&quot;
  
  
  
          classpath &quot;androidx.navigation:navigation-safe-args-gradle-plugin:2.3.5&quot;
  
          classpath 'com.google.dagger:hilt-android-gradle-plugin:2.38.1'
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>
  <blockquote>
  <p>Build.gradle(app)</p>
  </blockquote>
  <pre><code>plugins {
      id 'com.android.application'
      id 'kotlin-android'
      id 'androidx.navigation.safeargs'
      id 'dagger.hilt.android.plugin'
      id 'kotlin-kapt'
  }
  android {
      compileSdk 31
      buildToolsVersion &quot;30.0.3&quot;
  
  
      sourceSets {
          main {
              java {
                  srcDirs += 'build/generated/source/navigation-args'
              }
          }
      }
  
      defaultConfig {
          applicationId &quot;com.mertkavrayici.movieapplicationchallenge&quot;
          minSdk 28
          targetSdk 31
          versionCode 1
          versionName &quot;1.0&quot;
  
          testInstrumentationRunner &quot;androidx.test.runner.AndroidJUnitRunner&quot;
      }
  
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
          }
      }
      compileOptions {
          sourceCompatibility JavaVersion.VERSION_1_8
          targetCompatibility JavaVersion.VERSION_1_8
      }
      kotlinOptions {
          jvmTarget = '1.8'
      }
      buildFeatures{
          dataBinding=true
          viewBinding true
      }
  }
  
  kapt {
      generateStubs = true
  }
  
  dependencies {
  
      implementation 'androidx.core:core-ktx:1.6.0'
      implementation 'androidx.appcompat:appcompat:1.3.1'
      implementation 'com.google.android.material:material:1.4.0'
      implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
      implementation 'androidx.legacy:legacy-support-v4:1.0.0'
      testImplementation 'junit:junit:4.13.2'
      androidTestImplementation 'androidx.test.ext:junit:1.1.3'
      androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
  
  
      //Navigation Component
  
  
      implementation &quot;androidx.navigation:navigation-fragment-ktx:2.3.5&quot;
      implementation &quot;androidx.navigation:navigation-ui-ktx:2.3.5&quot;
  </code></pre>