Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to find generated Parcelable class for Room database. #375

Open
mmlaif opened this issue Sep 26, 2019 · 6 comments
Open

Unable to find generated Parcelable class for Room database. #375

mmlaif opened this issue Sep 26, 2019 · 6 comments

Comments

@mmlaif
Copy link

mmlaif commented Sep 26, 2019

This library start to crash my app on some users devices, I can't replicate the error to solve it or understand it!

Firebase shows:

Fatal Exception: org.a.d
Unable to find generated Parcelable class for com.mzdhr.taskboxes.database.b.a, verify that your class is configured properly and that the Parcelable class com.mzdhr.taskboxes.database.b.a$$Parcelable is generated by Parceler.
org.parceler.Parcels$ParcelCodeRepository.get (Parcels.java:86)
org.parceler.Parcels.wrap (Parcels.java:6)
org.parceler.Parcels.wrap (Parcels.java:6)
org.parceler.Parcels.wrap (Parcels.java:8)
org.parceler.Parcels.wrap (Parcels.java:8)
com.mzdhr.taskboxes.adapter.ListTaskAdapter$ListTaskViewHolder.bindTask (ListTaskAdapter.java:30)
com.mzdhr.taskboxes.adapter.ListTaskAdapter$ListTaskViewHolder.lambda$k6isy2_9Solp7Y5dt9bbw6BfEvQ (ListTaskAdapter.java)
com.mzdhr.taskboxes.adapter.-$$Lambda$ListTaskAdapter$ListTaskViewHolder$k6isy2_9Solp7Y5dt9bbw6BfEvQ.onClick (-.java:4)
android.view.View.performClick (View.java:6600)
android.view.View.performClickInternal (View.java:6577)
android.view.View.access$3100 (View.java:781)
android.view.View$PerformClick.run (View.java:25912)
android.os.Handler.handleCallback (Handler.java:873)
android.os.Handler.dispatchMessage (Handler.java:99)
android.os.Looper.loop (Looper.java:193)
android.app.ActivityThread.main (ActivityThread.java:6923)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:870)
@johncarl81
Copy link
Owner

Do you have some example code where the issue is happening?

@mmlaif
Copy link
Author

mmlaif commented Sep 27, 2019

Code:

                /** Passing Data to More Info Dialog via a Bundle Args **/
                // Passing data to DetailsFragment via a Bundle
                android.app.FragmentManager manager = ((Activity) mContext).getFragmentManager();
                Bundle args = new Bundle();
                Parcelable wrappedTaskEntity = Parcels.wrap(taskEntity);
                args.putParcelable(Constant.TASK_PARCELABLE_KEY, wrappedTaskEntity);
                mMoreInfoDialog.setArguments(args);
                mMoreInfoDialog.show(manager, "TaskMoreInfoFragment");

This happen (inside a adapter/viewholder classes) when I try to Parcels lib to wrap my objects to send them as args to a dialog. It works fine, but in some phones the library can parcel my objects and app crash.

com.mzdhr.taskboxes.database.b.a

b.a is the entitiy/TAskEntitiy.java class that used with Room database. I think using proguard shriks resources names.

Users effective:
11

Phones effective:
moto g(6) play
Galaxy S8+
Galaxy A6+
Moto G (3rd Gen)
HUAWEI Mate 9 lite
Lenovo PHAB2 Plus
P20

OS version:
7, 6, 9, 8

App link:
https://play.google.com/store/apps/details?id=com.mzdhr.taskboxes

@johncarl81
Copy link
Owner

Are you splitting your app up into multiple different aars?

@mmlaif
Copy link
Author

mmlaif commented Sep 27, 2019

multiple different aars? activities, fragments, dialgos if you mean that then yes.

@johncarl81
Copy link
Owner

No, I mean android archives... We've seen issues with using Parcelables and classloaders between libraries. Doesn't sound like this is the case for you, however.

What version of Parceler are you using?

@mmlaif
Copy link
Author

mmlaif commented Sep 27, 2019

Oh.
It was version 1.1.11. I upgrade to 1.1.12 trying to replicated the error but couldn't. I think i need other phone devices to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants