Status Update
Comments
li...@gmail.com <li...@gmail.com> #2
Could we get an official response to this feature request? Is there an idea to support SafeArgs in navigation-compose one day? Not asking for any time frames. Maybe there is no plans for statically generated args for navigation-compose at all.
vi...@google.com <vi...@google.com>
li...@gmail.com <li...@gmail.com> #3
Please check out my implementation of the same-
Part 1-https://proandroiddev.com/safe-compose-arguments-an-improved-way-to-navigate-in-jetpack-compose-95c84722eec2
Part 2-https://proandroiddev.com/safe-compose-arguments-an-improved-way-to-navigate-in-jetpack-compose-part-2-218a6ae7a027
Github repo-https://github.com/dilrajsingh1997/safe-compose-args
Part 1-
Part 2-
Github repo-
li...@gmail.com <li...@gmail.com> #5
+1
vi...@google.com <vi...@google.com>
ag...@google.com <ag...@google.com> #6
this library make it super easy if can you support this on the native way
li...@gmail.com <li...@gmail.com> #7
Here's a library that does just this:
Description
Version used: 1.0.0-rc01 and 1.0.0-rc02
Theme used: default
Devices/Android versions reproduced on: all devices
Migrated to AndroidX fully.
implementation "androidx.preference:preference:1.0.0-rc02"
implementation "androidx.appcompat:appcompat:1.0.0-rc02"
implementation "androidx.recyclerview:recyclerview:1.0.0-rc02"
implementation "com.google.android.material:material:1.0.0-rc01"
Debug build runs fine, release build without proguard runs fine, release build with proguard crashes on app create.
Stacktrace:
java.lang.VerifyError: Verifier rejected class d.a: androidx.preference.Preference d.a.a(androidx.fragment.app.k, int) failed to verify: androidx.preference.Preference d.a.a(androidx.fragment.app.k, int): [0x8] 'this' argument 'Reference: androidx.fragment.app.k' not instance of 'Reference: androidx.preference.B'
androidx.preference.Preference d.a.a(androidx.fragment.app.k, int, java.lang.String) failed to verify: androidx.preference.Preference d.a.a(androidx.fragment.app.k, int, java.lang.String): [0x8] 'this' argument 'Reference: androidx.fragment.app.k' not instance of 'Reference: androidx.preference.B' (declaration of 'd.a' appears in /data/app/com.myapp-cQgUAta0uQbckGZ2coEj1A==/base.apk)
at d.a.a(Unknown Source:0)
at io.fabric.sdk.android.a.b.y.a(ExecutorUtils.java:6)
at io.fabric.sdk.android.a.b.y.a(ExecutorUtils.java:4)
at
at com.crashlytics.android.a.<init>(Crashlytics.java:1)
at com.myapp.AppClass.onCreate(AppClass.kt:6)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1130)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5965)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1755)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6753)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:482)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
I've tried removing Fabric all together, this is not the cause of issue.