Could not find androidx.navigation:safe-args-gradle-plugin:1.0.0-alpha01

笑着哭i 提交于 2019-12-03 05:08:05
Lucien Kerl

Try to add

classpath "android.arch.navigation:navigation-safe-args-gradle-plugin:1.0.0-alpha01" 

instead of

classpath "androidx.navigation:safe-args-gradle-plugin:1.0.0-alpha01"
kovac777

check packages from Google maven repository
http://joxi.ru/GrqxKRgiQn1OZA

Accepted answer didn't work for me. But when I used alpha 5 it worked

Project build.gradle:

classpath "android.arch.navigation:navigation-safe-args-gradle-plugin:1.0.0-alpha05"

Now you can use the following classpath in order to use safe-args with AndroidX

classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.1.0-alpha02"

For more details you can check here

all of the above did not work for me. I only needed to put apply plugin: "androidx.navigation.safeargs.kotlin" after apply plugin: 'kotlin-android' apply plugin: 'kotlin-kapt' apply plugin: 'kotlin-android-extensions'

I solved this problem by replacing

classpath "android.arch.navigation:navigation-safe-args-gradle-plugin:$version_navigation" 

in project level build where version_navigation = "2.1.0" with

classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$version_navigation"

In my case I had to add this plugin :

apply plugin: "androidx.navigation.safeargs.kotlin"

at the bottom and worked perfectly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!