lisen87 / image_pickers

图片多选并压缩,保存图片到相册,视频多选,预览图片和视频
Apache License 2.0
90 stars 59 forks source link

1.0.8+3版本,android 10 打开摄像头即崩溃 #52

Closed fcloud89 closed 1 year ago

fcloud89 commented 4 years ago

E/AndroidRuntime(11166): java.lang.RuntimeException: Failure delivering result ResultInfo{who=@android:requestPermissions:, request=2, result=-1, data=Intent { act=android.content.pm.action.REQUEST_PERMISSIONS (has extras) }} to activity {cn.wowjoy.sljt/com.luck.picture.lib.PictureSelectorCameraEmptyActivity}: java.lang.IllegalArgumentException: MIME type .png cannot be inserted into content://media/external/images/media; expected MIME type under image/ E/AndroidRuntime(11166): at android.app.ActivityThread.deliverResults(ActivityThread.java:5342) E/AndroidRuntime(11166): at android.app.ActivityThread.handleSendResult(ActivityThread.java:5383) E/AndroidRuntime(11166): at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51) E/AndroidRuntime(11166): at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) E/AndroidRuntime(11166): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) E/AndroidRuntime(11166): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2270) E/AndroidRuntime(11166): at android.os.Handler.dispatchMessage(Handler.java:107) E/AndroidRuntime(11166): at android.os.Looper.loop(Looper.java:237) E/AndroidRuntime(11166): at android.app.ActivityThread.main(ActivityThread.java:8125) E/AndroidRuntime(11166): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(11166): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496) E/AndroidRuntime(11166): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100) E/AndroidRuntime(11166): Caused by: java.lang.IllegalArgumentException: MIME type .png cannot be inserted into content://media/external/images/media; expected MIME type under image/ E/AndroidRuntime(11166): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:170) E/AndroidRuntime(11166): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:140) E/AndroidRuntime(11166): at android.content.ContentProviderProxy.insert(ContentProviderNative.java:481) E/AndroidRuntime(11166): at android.content.ContentResolver.insert(ContentResolver.java:1835) E/AndroidRuntime(11166): at com.luck.picture.lib.tools.MediaUtils.createImageUri(MediaUtils.java:53) E/AndroidRuntime(11166): at com.luck.picture.lib.PictureBaseActivity.startOpenCamera(PictureBaseActivity.java:910) E/AndroidRuntime(11166): at com.luck.picture.lib.PictureSelectorCameraEmptyActivity.startCamera(PictureSelectorCameraEmptyActivity.java:119) E/AndroidRuntime(11166): at com.luck.picture.lib.PictureSelectorCameraEmptyActivity.onTakePhoto(PictureSelectorCameraEmptyActivity.java:100) E/AndroidRuntime(11166): at com.luck.picture.lib.PictureSelectorCameraEmptyActivity.onRequestPermissionsResult(PictureSelectorCameraEmptyActivity.java:371) E/AndroidRuntime(11166): at android.app.Activity.dispatchRequestPermissionsResult(Activity.java:8476) E/AndroidRuntime(11166): at android.app.Activity.dispatchActivityResult(Activity.java:8298) E/AndroidRuntime(11166): at android.app.ActivityThread.deliverResults(ActivityThread.java:5335) E/AndroidRuntime(11166): ... 11 more

@lisen87 @cuixiaocun

lisen87 commented 4 years ago

新版本已处理

congdanh1608 commented 6 months ago

Still happen on the latest version image_pickers 2.0.5+1

E/AndroidRuntime(14004): java.lang.IllegalArgumentException: MIME type */* cannot be inserted into content://media/external/images/media; expected MIME type under image/* E/AndroidRuntime(14004): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:170) E/AndroidRuntime(14004): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:140) E/AndroidRuntime(14004): at android.content.ContentProviderProxy.insert(ContentProviderNative.java:481) E/AndroidRuntime(14004): at android.content.ContentResolver.insert(ContentResolver.java:1831) E/AndroidRuntime(14004): at com.leeson.image_pickers.utils.Saver.copy(Saver.java:651) E/AndroidRuntime(14004): at com.leeson.image_pickers.utils.Saver.copyImgToPicture(Saver.java:616) E/AndroidRuntime(14004): at com.leeson.image_pickers.utils.Saver.access$100(Saver.java:46) E/AndroidRuntime(14004): at com.leeson.image_pickers.utils.Saver$2.onDownloadSuccess(Saver.java:162) E/AndroidRuntime(14004): at com.leeson.image_pickers.utils.Saver$9$1.run(Saver.java:569) E/AndroidRuntime(14004): at android.os.Handler.handleCallback(Handler.java:883) E/AndroidRuntime(14004): at android.os.Handler.dispatchMessage(Handler.java:100) E/AndroidRuntime(14004): at android.os.Looper.loop(Looper.java:214) E/AndroidRuntime(14004): at android.app.ActivityThread.main(ActivityThread.java:7397) E/AndroidRuntime(14004): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(14004): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) E/AndroidRuntime(14004): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935) I/Process (14004): Sending signal. PID: 14004 SIG: 9

lisen87 commented 6 months ago

这可能是保存图片时没有后缀名造成的,刚刚提交了新版本,稍后测试一下吧。