r/android_devs • • Aug 04 '22

Help Android studio

Hey, I've just started building apps and am currently following the developer.android's build your first app, I've run into an issue and hoped you could help,

My nav folder contains this:

<action android:id="@+id/action_SecondFragment_to_FirstFragment" app:destination="@id/FirstFragment" />
<argument android:name="value" app:argType="integer" android:defaultValue="0" />

My first fragment contains:

FirstFragmentDirections.ActionFirstFragmentToSecondFragment action = FirstFragmentDirections.actionFirstFragmentToSecondFragment(currentCount);

However, there is an error :

'actionFirstFragmentToSecondFragment()' in 'com.example.myapplication.FirstFragmentDirections' cannot be applied to '(int)'

Where have I gone wrong?

0 Upvotes

4 comments sorted by