PictureSelector Caused by java.lang.ClassNotFoundException

pbgvytdp  于 2022-10-24  发布在  Java
关注(0)|答案(1)|浏览(317)

品牌: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)

gg58donl

gg58donl1#

add below proguard-rules but still occour this bug
#PictureSelector 2.0
-keep class com.luck.picture.lib.**{ *; }

Ucrop

-dontwarn com.yalantis.ucrop**
-keep class com.yalantis.ucrop**{ ; }
-keep interface com.yalantis.ucrop
*{ *; }

Okio

-dontwarn org.codehaus.mojo.animal_sniffer.*

相关问题