Step #3: Requesting the Plugins

Just because we added a plugin artifact does not mean that we actually use the plugin. We need an additional line to say where we want that plugin to take effect.

That line goes in the app/build.gradle file, representing build instructions for the app module. We already have a plugins closure listing a pair of plugins:

plugins {
  id 'com.android.application'
  id 'kotlin-android'

Add one more to that list:

  id 'androidx.navigation.safeargs.kotlin'

The androidx.navigation.safeargs.kotlin plugin is for “Safe Args”, a feature of the Navigation component that helps us pass data from one screen to another.

You will be tempted by the banner asking you to “Sync Now”. Do not give into the temptation.

(or, go ahead and click “Sync Now” if you really want to, though we have more changes to make)


Prev Table of Contents Next

This book is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.