-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
报空指针异常 #13
Comments
做的什么操作呢? |
getTakePhoto().onEnableCompress(compressConfig,true).onPickFromCaptureWithCrop(imageUri,cropOptions); |
不做剪切正常,剪切就报空指针,我的是小米手机 |
你的cropOptions传的是什么? 手机是Android6.0系统吗?有没有申请读写SD卡的权限? |
CropOptions 配置为: |
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1007, result=-1, data=Intent { dat=file:///storage/emulated/0/DCIM/Camera/IMG_20160814_162224_HDR.jpg typ=image/jpeg }} to activity
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v4.app.Fragment.startActivityForResult(android.content.Intent, int)' on a null object reference
at android.app.ActivityThread.deliverResults(ActivityThread.java:3706)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:3749)
at android.app.ActivityThread.access$1400(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1400)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5438)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v4.app.Fragment.startActivityForResult(android.content.Intent, int)' on a null object reference
at com.soundcloud.android.crop.Crop.start(Crop.java:151)
at com.soundcloud.android.crop.Crop.start(Crop.java:128)
at com.jph.takephoto.uitl.TUtils.cropWithOwnApp(TUtils.java:102)
at com.jph.takephoto.app.TakePhotoImpl.onCrop(TakePhotoImpl.java:195)
at com.jph.takephoto.app.TakePhotoImpl.onActivityResult(TakePhotoImpl.java:87)
at com.jph.takephoto.app.TakePhotoFragmentActivity.onActivityResult(TakePhotoFragmentActivity.java:27)
at android.app.Activity.dispatchActivityResult(Activity.java:6508)
at android.app.ActivityThread.deliverResults(ActivityThread.java:3702)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:3749)
at android.app.ActivityThread.access$1400(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1400)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5438)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
The text was updated successfully, but these errors were encountered: