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 :
No comments:
Post a Comment