title: Failed to add navigation dependency
body: <p>I am trying to Add Navigation in my project but its showing failed to add Navigation dependency,</p>
  <p>when i click on 'ok' in the window to add these now , its showing failed to add dependency  and my navigation xml editor is not visible</p>
  <p>here are some screen shots <a href="https://i.stack.imgur.com/h1JxL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/h1JxL.png" alt="" /></a></p>
  <p>my build.gradle (app) :-</p>
  <pre><code>plugins {
  id 'com.android.application'
  id 'kotlin-android'
  id 'com.google.gms.google-services'
  id 'kotlin-android-extensions'
  
  }
  
  android {
  compileSdkVersion 31
  buildToolsVersion &quot;30.0.3&quot;
  
  defaultConfig {
      applicationId &quot;com.choudhary.myshop&quot;
      minSdkVersion 21
      targetSdkVersion 31
      versionCode 1
      versionName &quot;1.0&quot;
  
      testInstrumentationRunner &quot;androidx.test.runner.AndroidJUnitRunner&quot;
  }
  
  androidExtensions {
      experimental = true
  }
  
  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{
      viewBinding = true
  }
  
  
  
  
  }
  
  dependencies {
  
  
  
  
  implementation &quot;org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version&quot;
  implementation 'androidx.core:core-ktx:1.7.0'
  implementation 'androidx.appcompat:appcompat:1.4.1'
  implementation 'com.google.android.material:material:1.5.0'
  implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
  implementation 'com.google.firebase:firebase-auth-ktx:21.0.1'
  implementation 'androidx.legacy:legacy-support-v4:1.0.0'
  implementation 'androidx.navigation:navigation-fragment-ktx:2.4.0'
  implementation 'androidx.navigation:navigation-ui-ktx:2.4.0'
  
  testImplementation 'junit:junit:4.+'
  androidTestImplementation 'androidx.test.ext:junit:1.1.3'
  androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
  
  implementation platform('com.google.firebase:firebase-bom:29.0.4')
  implementation 'com.google.firebase:firebase-analytics-ktx'
  implementation platform('com.google.firebase:firebase-bom:29.0.0')
  implementation 'com.google.firebase:firebase-firestore'
  implementation 'com.github.bumptech.glide:glide:4.12.0'
  annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
  implementation 'com.google.firebase:firebase-storage-ktx'
  
  
  def lifecycle_version = &quot;2.5.0-alpha01&quot;
  def arch_version = &quot;2.1.0&quot;
  
  // ViewModel
  implementation(&quot;androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version&quot;)
  // ViewModel utilities for Compose
  implementation(&quot;androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycle_version&quot;)
  // LiveData
  implementation(&quot;androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version&quot;)
  
  def nav_version = &quot;2.4.0&quot;
  
  
  
  // Kotlin
  implementation(&quot;androidx.navigation:navigation-fragment-ktx:$nav_version&quot;)
  implementation(&quot;androidx.navigation:navigation-ui-ktx:$nav_version&quot;)
  
  // Feature module Support
  implementation(&quot;androidx.navigation:navigation-dynamic-features-fragment:$nav_version&quot;)
  
  // Testing Navigation
  androidTestImplementation(&quot;androidx.navigation:navigation-testing:$nav_version&quot;)
  
  // Jetpack Compose Integration
  implementation(&quot;androidx.navigation:navigation-compose:2.5.0-alpha01&quot;)
  }
  </code></pre>
  <p>my build.gradle (project ) :-</p>
  <pre><code>buildscript {
      ext.kotlin_version = &quot;1.4.32&quot;
      repositories {
          google()
          jcenter()
      }
      dependencies {
          classpath &quot;com.android.tools.build:gradle:4.1.3&quot;
          classpath &quot;org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version&quot;
          classpath 'com.google.gms:google-services:4.3.10'
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  allprojects {
      repositories {
          google()
          jcenter()
          mavenCentral()
      }
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>