android-studioandroidxandroid-architecture-navigation

Plugin with id 'androidx.navigation.safeargs' not found


When I try to add Safe Args (Android Navigation) to my app's as following

( using this guide : https://developer.android.com/topic/libraries/architecture/navigation/navigation-pass-data ) :

apply plugin: 'com.android.application'
apply plugin: 'androidx.navigation.safeargs'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.google.gms.google-services'

android {...

I receive this error :

Plugin with id 'androidx.navigation.safeargs' not found.


Solution

  • In Android Studio bellow bumblebee

    To add androidx.navigation.safeargsplugin follow below step's

    1. classpath "android.arch.navigation:navigation-safe-args-gradle-plugin:2.4.2-alpha09"
      (latest) Add above to your Project Gradel file inside dependency block

    2. Then add apply plugin: 'androidx.navigation.safeargs' to your app/Module gradle file


    In Android Studio bumblebee+

    id 'androidx.navigation.safeargs' version '2.4.2' apply false