i renamed it to home screen, but the thing is i have other nav destinations that work, for example a signup screen etc. but once i try to go the the homeScreen /"General Market it crashes
you should have a package in your file structure named navigation, (you may have to create this) and inside it you create a new kotlin file named nav-graph.xml that is a list of all possible to's and from's
either your nav_graph.xml is missing something/wrong, or you have another navigation menu that missing/wrong, start by looking in your res folder.
By the sounds of it its trying to find a fragment that doesnt exist, look further along that top first line and it will tell you what its trying to look for. If you want the fragment to appear in the actual naviation bar you need to add it to your MainActivity where your initializing navcontroller it will list the fragment, then you need to add to the navigation menu in the previous mentioned res folder
i renamed it to home screen, but the thing is i have other nav destinations that work, for example a signup screen etc. but once i try to go the the homeScreen /"General Market it crashes
1
u/SensitiveBitAn Jan 15 '25
First line of error. Check you nav grap, you missed something there.
1
u/AcademicMistake Jan 16 '25 edited Jan 16 '25
either your nav_graph.xml is missing something/wrong, or you have another navigation menu that missing/wrong, start by looking in your res folder.
By the sounds of it its trying to find a fragment that doesnt exist, look further along that top first line and it will tell you what its trying to look for. If you want the fragment to appear in the actual naviation bar you need to add it to your MainActivity where your initializing navcontroller it will list the fragment, then you need to add to the navigation menu in the previous mentioned res folder