Questions tagged [android-safe-args]

144 questions
1
vote
1 answer

When i use FragmentArgs i get this error 'java.lang.RuntimeException: java.lang.reflect.InvocationTargetException'

Fragment Class Did make my model class Serializable. Getting the args from another fragment. class AnimeFragment : Fragment() { private lateinit var binding: FragmentAnimeBinding val args by navArgs() override fun…
1
vote
0 answers

android bitbucket pipleine build ./gradlew assembleQADebug failure but local build works?

I enabled the pipleline and created the bitbuket-pipelines.yaml for my android project in bitbucket repo. The pipeline build seems started fine and I can see the gradle tasks are being executed in the output console, just like executing the same…
Sean
  • 2,967
  • 2
  • 29
  • 39
1
vote
1 answer

Safe-args: Passing an object from an imported package. Possible?

I'm trying to pass a Track object from the GPX Parser package that I've imported. This is my navigation xml: I'm getting runtime…
user19109604
1
vote
2 answers

"error: package R does not exist" in all Direction classes after android studio update

I Updated my Android studio to ChipMunk 2021.2.1 and then Android Studio recommend me to move package name from Android Manifest to build.gradle : from:
1
vote
0 answers

android add safe-args classpath in new Gragle Plugin versions

How can I solve this problem? Navigation classes are not generated I created a new project with the new gradle structure but I can't use navigation because I don't know where to add it.
1
vote
1 answer

How do I fix Android Studio Error "Cannot access class... Check your module classpath for missing or conflicting dependencies"

I am practing how to using SafeArgs and some other kotlin tools. Even after adding the SafeArgs plugin and classpath I still get an error saying.. Cannot access class 'com.example.testingtaskmanager.ui.updatefragment.UpdateFragmentArgs'. Check your…
1
vote
1 answer

Android SafeArgs produces duplicate class error

I have a problem with AndroidX SafeArgs Gradle Plugin and AGP 7.1.0, default one for Android Builds. I've tried to use SafeArgs 2.5.0-aplha01 which sholud be compliant with AGP 7.1.0, but it caused a lot of duplicate class entires (list attached…
1
vote
0 answers

Same Action but different arguments in Navigation Component

I am using Android Navigation Component and following the MVVM pattern(with Repository and Room). I am making a notes app where I have a Main Activity and two fragments. Show Notes Fragment and Add/Update Notes fragment. I ran into a problem when…
1
vote
2 answers

Unresolved Reference: When Custom Parcelable Argument Used : Jetpack Navigation

This is my first time with Jetpack Navigation and Safe args. I am getting an error when using custom Parcelable as an argument to pass to an specific fragment. This is What I am Getting in Error when Building: com/bhardwaj/ui/FragmentUIDetails.kt:…
1
vote
1 answer

Android fragment safe args

Can somebody explain to me how it's works? From (MainFragment) tap on FAB to create new fragment(HabitEditorScreenFragment) through navigation component. Applying to it Parcelable argument. In that fragment i'm going in new…
Pentiux
  • 215
  • 3
  • 10
1
vote
0 answers

Android project build fails on Bitrise with safeargs exception

My Android app runs normally on emulator, but the build is not succeeding on Bitrise. It throws this exception: Caused by: org.gradle.api.GradleException: androidx.navigation.safeargs can only be used with an androidx project I have the folowing…
1
vote
1 answer

Android SafeArgs - Can't import the Navigation Directions class generated

I'm here to report my problem for what it seems I can't find any solution on the internet, so I decided to write here, I've been trying for days to solve this and I still don't understand where the reason for the error is. The error basically is, I…
1
vote
0 answers

Navigation Component : How to pass safe args from main fragment to navigation drawer in Main Activity which hosts the main fragment?

I want to get safe args from the main fragment in the main activity, to provide them to the navigation drawer. How can I get arguments in NavController.OnDestinationChangedListener, from an API called in the main fragment or any other fragment.
1
vote
0 answers

Navigation Component Safe Args Issue on Navigation Drawer

I have implemented Navigation drawer using Android Navigation Component which has two fragments 1.Home Fragment 2.Product Fragment I have created another fragment Search Fragment as global action , which has edit text and a button. Problem :- From…
Shobhith
  • 505
  • 4
  • 12
1
vote
1 answer

Android: Fragment restore with BottomNavigationView, NavController and SafeArgs

i'm currently working on an Android app and encountered a problem concerning BottomNavigationView and Fragments. I know, there are similar questions like mine but either they doesn't solve my problem or they have no working answers. My app consists…