coomar2841 / image-chooser-library

An Easy Image/Video Chooser Library for your Android Apps
646 stars 192 forks source link

NullPointerException: Attempt to invoke virtual method 'void com.kbeanie.imagechooser.api.ImageChooserManager.submit(int, android.content.Intent)' on a null object reference #122

Closed WOSHICAIXIANFENG closed 8 years ago

WOSHICAIXIANFENG commented 9 years ago

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.kbeanie.imagechooser.api.ImageChooserManager.submit(int, android.content.Intent)' on a null object reference at com.dtc.module.form.CollectionPhotoHandling.submitImageData(CollectionPhotoHandling.java:81) at com.dtc.module.main.ListCollectionInformationFragment.onActivityResult(ListCollectionInformationFragment.java:241) at android.support.v4.app.FragmentActivity.onActivityResult(FragmentActivity.java:165) at android.app.Activity.dispatchActivityResult(Activity.java:6192) at android.app.ActivityThread.deliverResults(ActivityThread.java:3570)

WOSHICAIXIANFENG commented 9 years ago

CollectionPhotoHandling.java:81

// Callback when image data response, call after 'onActivityResult' public void submitImageData(int requestCode, Intent data) { mImageChooser.submit(requestCode, data); }

AlexPGA commented 8 years ago

i have the same error. How do you solve it? thanks for your reply

coomar2841 commented 8 years ago

Is mImagechooser null? If yes, you will have to reinitialize it.

AlexPGA commented 8 years ago

coomar2841 thanks for this and all replys. I solve my problems