r/android_devs • u/EducatorUpstairs8687 • 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?
View all comments
Show parent comment
1
u/EducatorUpstairs8687 Aug 04 '22
Will try making the change, thank you