LuckSiege / PictureSelector

Picture Selector Library for Android or 图片选择器
Apache License 2.0
13.33k stars 3.02k forks source link

乐视1s(Letv X500) 拍照失败,无法创建照片文件 #2744

Open Vessless opened 1 year ago

Vessless commented 1 year ago

Current use version?

当前使用的版本是多少?

v3.11.1

Will this problem occur in demo?

Demo能否复现这问题?

是,必现

Describe the problem or provide an error log?

描述问题或提供错误log?


机型:乐视1s(Letv X500) android版本:6.0

问题:调用系统拍照失败.  改用demo中的自定义相机可以正常拍照

```Log:  Load failed for [/storage/emulated/0/DCIM/Camera/IMG_20230815133103952.jpeg] with dimensions [200x200]
                                                                                                    class com.bumptech.glide.load.engine.GlideException: Failed to load resource
                                                                                                    There were 3 root causes:
                                                                                                    java.io.FileNotFoundException(/storage/emulated/0/DCIM/Camera/IMG_20230815133103952.jpeg: open failed: ENOENT (No such file or directory))
                                                                                                    java.io.FileNotFoundException(No such file or directory)
                                                                                                    java.io.FileNotFoundException(No such file or directory)
                                                                                                     call GlideException#logRootCauses(String) for more detail
                                                                                                      Cause (1 of 3): class com.bumptech.glide.load.engine.GlideException: Fetching data failed, class java.io.InputStream, LOCAL
                                                                                                    There was 1 root cause:
                                                                                                    java.io.FileNotFoundException(/storage/emulated/0/DCIM/Camera/IMG_20230815133103952.jpeg: open failed: ENOENT (No such file or directory))
                                                                                                     call GlideException#logRootCauses(String) for more detail
                                                                                                        Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Fetch failed
                                                                                                    There was 1 root cause:
                                                                                                    java.io.FileNotFoundException(/storage/emulated/0/DCIM/Camera/IMG_20230815133103952.jpeg: open failed: ENOENT (No such file or directory))
                                                                                                     call GlideException#logRootCauses(String) for more detail
                                                                                                          Cause (1 of 1): class java.io.FileNotFoundException: /storage/emulated/0/DCIM/Camera/IMG_20230815133103952.jpeg: open failed: ENOENT (No such file or directory)
                                                                                                      Cause (2 of 3): class com.bumptech.glide.load.engine.GlideException: Fetching data failed, class android.os.ParcelFileDescriptor, LOCAL
                                                                                                    There was 1 root cause:
                                                                                                    java.io.FileNotFoundException(No such file or directory)
                                                                                                     call GlideException#logRootCauses(String) for more detail
                                                                                                        Cause (1 of 1): class java.io.FileNotFoundException: No such file or directory
                                                                                                      Cause (3 of 3): class com.bumptech.glide.load.engine.GlideException: Fetching data failed, class android.content.res.AssetFileDescriptor, LOCAL
                                                                                                    There was 1 root cause:
                                                                                                    java.io.FileNotFoundException(No such file or directory)
                                                                                                     call GlideException#logRootCauses(String) for more detail
                                                                                                        Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Fetch failed
                                                                                                    There was 1 root cause:
                                                                                                    java.io.FileNotFoundException(No such file or directory)
                                                                                                     call GlideException#logRootCauses(String) for more detail
                                                                                                          Cause (1 of 1): class java.io.FileNotFoundException: No such file or directory
2023-08-15 13:31:07.762 15459-15459 Glide                   com.luck.pictureselector             I  Root cause (1 of 3)
                                                                                                    java.io.FileNotFoundException: /storage/emulated/0/DCIM/Camera/IMG_20230815133103952.jpeg: open failed: ENOENT (No such file or directory)
                                                                                                        at libcore.io.IoBridge.open(IoBridge.java:487)
                                                                                                        at java.io.FileInputStream.<init>(FileInputStream.java:76)
                                                                                                        at java.io.FileInputStream.<init>(FileInputStream.java:103)
                                                                                                        at android.content.ContentResolver.openInputStream(ContentResolver.java:676)
                                                                                                        at com.bumptech.glide.load.data.StreamLocalUriFetcher.loadResourceFromUri(StreamLocalUriFetcher.java:74)
                                                                                                        at com.bumptech.glide.load.data.StreamLocalUriFetcher.loadResource(StreamLocalUriFetcher.java:50)
                                                                                                        at com.bumptech.glide.load.data.StreamLocalUriFetcher.loadResource(StreamLocalUriFetcher.java:13)
                                                                                                        at com.bumptech.glide.load.data.LocalUriFetcher.loadData(LocalUriFetcher.java:44)
                                                                                                        at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.loadData(MultiModelLoader.java:100)
                                                                                                        at com.bumptech.glide.load.engine.SourceGenerator.startNextLoad(SourceGenerator.java:95)
                                                                                                        at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:88)
                                                                                                        at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:311)
                                                                                                        at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:280)
                                                                                                        at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:235)
                                                                                                        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                                                                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                                                                        at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:424)
                                                                                                        at java.lang.Thread.run(Thread.java:818)
                                                                                                        at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultPriorityThreadFactory$1.run(GlideExecutor.java:383)
                                                                                                    Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
                                                                                                        at libcore.io.Posix.open(Native Method)
                                                                                                        at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
                                                                                                        at libcore.io.IoBridge.open(IoBridge.java:473)
                                                                                                        at java.io.FileInputStream.<init>(FileInputStream.java:76) 
                                                                                                        at java.io.FileInputStream.<init>(FileInputStream.java:103) 
                                                                                                        at android.content.ContentResolver.openInputStream(ContentResolver.java:676) 
                                                                                                        at com.bumptech.glide.load.data.StreamLocalUriFetcher.loadResourceFromUri(StreamLocalUriFetcher.java:74) 
                                                                                                        at com.bumptech.glide.load.data.StreamLocalUriFetcher.loadResource(StreamLocalUriFetcher.java:50) 
                                                                                                        at com.bumptech.glide.load.data.StreamLocalUriFetcher.loadResource(StreamLocalUriFetcher.java:13) 
                                                                                                        at com.bumptech.glide.load.data.LocalUriFetcher.loadData(LocalUriFetcher.java:44) 
                                                                                                        at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.loadData(MultiModelLoader.java:100) 
                                                                                                        at com.bumptech.glide.load.engine.SourceGenerator.startNextLoad(SourceGenerator.java:95) 
                                                                                                        at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:88) 
                                                                                                        at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:311) 
                                                                                                        at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:280) 
                                                                                                        at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:235) 
                                                                                                        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) 
                                                                                                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 
                                                                                                        at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:424) 
                                                                                                        at java.lang.Thread.run(Thread.java:818) 
                                                                                                        at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultPriorityThreadFactory$1.run(GlideExecutor.java:383) 
2023-08-15 13:31:07.763 15459-15459 Glide                   com.luck.pictureselector             I  Root cause (2 of 3)
                                                                                                    java.io.FileNotFoundException: No such file or directory
                                                                                                        at android.os.Parcel.openFileDescriptor(Native Method)
                                                                                                        at android.os.ParcelFileDescriptor.openInternal(ParcelFileDescriptor.java:270)
                                                                                                        at android.os.ParcelFileDescriptor.open(ParcelFileDescriptor.java:200)
                                                                                                        at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:953)
                                                                                                        at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:881)
                                                                                                        at com.bumptech.glide.load.data.FileDescriptorLocalUriFetcher.loadResource(FileDescriptorLocalUriFetcher.java:20)
                                                                                                        at com.bumptech.glide.load.data.FileDescriptorLocalUriFetcher.loadResource(FileDescriptorLocalUriFetcher.java:12)
                                                                                                        at com.bumptech.glide.load.data.LocalUriFetcher.loadData(LocalUriFetcher.java:44)
                                                                                                        at com.bumptech.glide.load.engine.SourceGenerator.startNextLoad(SourceGenerator.java:95)
                                                                                                        at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:88)
                                                                                                        at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:311)
                                                                                                        at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherFailed(DecodeJob.java:416)
                                                                                                        at com.bumptech.glide.load.engine.SourceGenerator.onLoadFailedInternal(SourceGenerator.java:223)
                                                                                                        at com.bumptech.glide.load.engine.SourceGenerator$1.onLoadFailed(SourceGenerator.java:108)
                                                                                                        at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.startNextOrFail(MultiModelLoader.java:167)
                                                                                                        at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.onLoadFailed(MultiModelLoader.java:154)
                                                                                                        at com.bumptech.glide.load.data.LocalUriFetcher.loadData(LocalUriFetcher.java:50)
                                                                                                        at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.loadData(MultiModelLoader.java:100)
                                                                                                        at com.bumptech.glide.load.engine.SourceGenerator.startNextLoad(SourceGenerator.java:95)
                                                                                                        at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:88)
                                                                                                        at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:311)
                                                                                                        at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:280)
                                                                                                        at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:235)
                                                                                                        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                                                                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                                                                        at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:424)
                                                                                                        at java.lang.Thread.run(Thread.java:818)
                                                                                                        at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultPriorityThreadFactory$1.run(GlideExecutor.java:383)
LuckSiege commented 1 year ago

可能是该机型不支持此/storage/emulated/0/DCIM/Camera/IMG_20230815133103952.jpeg目录,可以自定义拍照路径试试

cc365774016 commented 2 months ago

后面你是怎么解决的?