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

Attempt to read from field 'int com.donkingliang.imageselector.entry.RequestConfig.f' on a null object reference #70

Open
mosentest opened this issue Aug 4, 2021 · 1 comment

Comments

@mosentest
Copy link

出错堆栈

1	java.lang.RuntimeException:Unable to start activity ComponentInfo{cn.yh.sdmp/com.donkingliang.imageselector.ImageSelectorActivity}: java.lang.NullPointerException: Attempt to read from field 'int com.donkingliang.imageselector.entry.RequestConfig.f' on a null object reference
2	android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3877)
3	......
4	Caused by:
5	java.lang.NullPointerException:Attempt to read from field 'int com.donkingliang.imageselector.entry.RequestConfig.f' on a null object reference
6	com.donkingliang.imageselector.ImageSelectorActivity.onCreate(ImageSelectorActivity.java:4)
7	android.app.Activity.performCreate(Activity.java:8085)
8	android.app.Activity.performCreate(Activity.java:8073)
9	android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1320)
10	android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3850)
11	android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4056)
12	android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91)
13	android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
14	android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
15	android.app.ActivityThread$H.handleMessage(ActivityThread.java:2464)
16	android.os.Handler.dispatchMessage(Handler.java:110)
17	android.os.Looper.loop(Looper.java:219)
18	android.app.ActivityThread.main(ActivityThread.java:8299)
19	java.lang.reflect.Method.invoke(Native Method)
20	com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
@donkingliang
Copy link
Owner

这种问题是混淆造成的,ImageSelector中的几个实体类实现Parcelable接口,Parcelable接口的实现类不应该混淆。

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