Pages

Wednesday, January 12, 2022

android tips : Could not find androidx.navigation:navigation-safe-args-gradle-plug-in:2.3.5

 

I tried to add the following classpath :


buildscript {
ext.nav_version = "2.4.0-rc01"
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.4"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10"
classpath 'androidx.navigation:navigation-safe-args-gradle-plug-in:2.3.5'

}

}


I obtained the following error :

Could not resolve all artifacts for configuration ':classpath'.

   > Could not find androidx.navigation:navigation-safe-args-gradle-plug-in:2.3.5.

In fact, solve the problem was quite simple.The version 2.3.5 didn't exist on the repository. 

To check which version you could take, you have to go to the Maven repository and find the correct dependency. Then copy the Gradle Kotlin DSL and change it for example like the following :

classpath "androidx.navigation.safeargs.kotlin:androidx.navigation.safeargs.kotlin.gradle.plugin:2.4.0-rc01"

You can find this dependency here :

https://maven.google.com/web/index.html#androidx.navigation.safeargs.kotlin:androidx.navigation.safeargs.kotlin.gradle.plugin:2.4.0-rc01

No comments:

Post a Comment

How to add internationalization to your android application ?

  Configure your project First, you need to add the following configuration in your file build.gradle (Module : app) : android { ..... andr...