LuckSiege / LuckSiege/PictureSelector

Caused by java.lang.ClassNotFoundException

Open
#2,032 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
13.6k
Forks
3.1k
PR merge metrics
No merged PRs in 30d

Description

品牌:Xiaomi
型号:Redmi 9
android 10

Caused by java.lang.RuntimeException: Parcelable encountered ClassNotFoundException reading a Serializable object (name = com.lyrebirdstudio.imagecameralib.utils.ImageCameraLibReturnTypes)
at android.os.Parcel.readSerializable(Parcel.java:3148)
at android.os.Parcel.readValue(Parcel.java:2920)
at android.os.Parcel.readArrayMapInternal(Parcel.java:3252)
at android.os.BaseBundle.initializeFromParcelLocked(BaseBundle.java:292)
at android.os.BaseBundle.unparcel(BaseBundle.java:236)
at android.os.Bundle.getParcelableArrayList(Bundle.java:1005)
at android.content.Intent.getParcelableArrayListExtra(Intent.java:7970)
at com.luck.picture.lib.PictureSelectorActivity.previewCallback(PictureSelectorActivity.java:1727)
at com.luck.picture.lib.PictureSelectorActivity.onActivityResult(PictureSelectorActivity.java:1699)
at android.app.Activity.dispatchActivityResult(Activity.java:8249)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4968)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:5016)
at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2071)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:224)
at android.app.ActivityThread.main(ActivityThread.java:7561)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:995)

Caused by java.lang.ClassNotFoundException: com.lyrebirdstudio.imagecameralib.utils.ImageCameraLibReturnTypes
at java.lang.Class.classForName(Class.java)
at java.lang.Class.forName(Class.java:454)
at android.os.Parcel$2.resolveClass(Parcel.java:3134)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1703)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1594)
at java.io.ObjectInputStream.readEnum(ObjectInputStream.java:1824)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1409)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:427)
at android.os.Parcel.readSerializable(Parcel.java:3142)
at android.os.Parcel.readValue(Parcel.java:2920)
at android.os.Parcel.readArrayMapInternal(Parcel.java:3252)
at android.os.BaseBundle.initializeFromParcelLocked(BaseBundle.java:292)
at android.os.BaseBundle.unparcel(BaseBundle.java:236)
at android.os.Bundle.getParcelableArrayList(Bundle.java:1005)
at android.content.Intent.getParcelableArrayListExtra(Intent.java:7970)
at com.luck.picture.lib.PictureSelectorActivity.previewCallback(PictureSelectorActivity.java:1727)
at com.luck.picture.lib.PictureSelectorActivity.onActivityResult(PictureSelectorActivity.java:1699)
at android.app.Activity.dispatchActivityResult(Activity.java:8249)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4968)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:5016)
at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2071)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:224)
at android.app.ActivityThread.main(ActivityThread.java:7561)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:995)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at PictureSelectorActivity.java around previewCallback line 1727 and onActivityResult line 1699, where the Android parcel is read. Investigate how ImageCameraLibReturnTypes is serialized and restored, then reproduce the reported Android 10 failure and verify that the ClassNotFoundException no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.