How to pass arguments to a global action function

I’m now clone-coding this codelab project.

By the way, I have a problem with the global action function of navigation.

CodeLab’s global action receives one argument,

I couldn’t pass arguments in the code I wrote.

The following error occurs:

Too many arguments for public open fun actionGlobalComposeFragment(): ComposeFragmentDirections.ActionGlobalComposeFragment defined in com.example.materialcomponentsmotioncodelab.ui.compose.ComposeFragmentDirections
fun navigateToHome(@StringRes titleRes: Int, mailbox: Mailbox) {
        binding.bottomAppBarTitle.text = getString(titleRes)
        // TODO: Set up MaterialFadeThrough transition as exit transition.
        val directions = HomeFragmentDirections.actionGlobalHomeFragment(mailbox)
        findNavController(R.id.nav_host_fragment).navigate(directions)
    }

    private fun navigateToCompose() {
        // TODO: Set up MaterialElevationScale transition as exit and reenter transitions.
        val directions = ComposeFragmentDirections.actionGlobalComposeFragment(currentEmailId)
        findNavController(R.id.nav_host_fragment).navigate(directions)
    }

    private fun navigateToSearch() {
        // TODO: Set up MaterialSharedAxis transition as exit and reenter transitions.
        val directions = SearchFragmentDirections.actionGlobalSearchFragment()
        findNavController(R.id.nav_host_fragment).navigate(directions)
    }

nav_graph only has a different package name, but everything else is the same.

<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/navigation_graph"
    app:startDestination="@id/homeFragment">
    <fragment
        android:id="@+id/homeFragment"
        android:name="com.example.materialcomponentsmotioncodelab.ui.home.HomeFragment"
        android:label="HomeFragment">
        <argument
            android:name="mailbox"
            app:argType="com.materialstudies.reply.ui.home.Mailbox"
            android:defaultValue="INBOX" />
        <action
            android:id="@+id/action_homeFragment_to_emailFragment"
            app:destination="@id/emailFragment" />
    </fragment>
    <fragment
        android:id="@+id/emailFragment"
        android:name="com.example.materialcomponentsmotioncodelab.ui.email.EmailFragment"
        android:label="EmailFragment">
        <argument
            android:name="emailId"
            app:argType="long" />
    </fragment>
    <fragment
        android:id="@+id/composeFragment"
        android:name="com.example.materialcomponentsmotioncodelab.ui.compose.ComposeFragment"
        android:label="ComposeFragment">
        <argument
            android:name="replyToEmailId"
            app:argType="long"
            android:defaultValue="-1L"/>
    </fragment>

    <fragment
        android:id="@+id/searchFragment"
        android:name="com.example.materialcomponentsmotioncodelab.ui.search.SearchFragment"
        android:label="SearchFragment" />
    <action
        android:id="@+id/action_global_homeFragment"
        app:destination="@+id/homeFragment"
        app:launchSingleTop="true"
        app:popUpTo="@+id/navigation_graph"
        app:popUpToInclusive="true"/>
    <action
        android:id="@+id/action_global_composeFragment"
        app:destination="@+id/composeFragment" />
    <action
        android:id="@+id/action_global_searchFragment"
        app:destination="@+id/searchFragment" />
</navigation>

What am I missing?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật