java.io.IOException: open failed: EINVAL (Invalid argument)

来源:互联网 发布:手机淘宝如何拍照查找 编辑:程序博客网 时间:2024/05/16 05:41
W/System.err: java.io.IOException: open failed: EINVAL (Invalid argument)W/System.err:     at java.io.File.createNewFile(File.java:948)W/System.err:     at com.katherine.du.utils.ScreenShotUtils.saveBitmap(ScreenShotUtils.java:60)W/System.err:     at com.katherine.du.api.JudgeIsHavedPictureApi.takeScreenShot(JudgeIsHavedPictureApi.java:76)W/System.err:     at com.katherine.du.api.JudgeIsHavedPictureApi.access$000(JudgeIsHavedPictureApi.java:25)W/System.err:     at com.katherine.du.api.JudgeIsHavedPictureApi$1.onSuccess(JudgeIsHavedPictureApi.java:51)W/System.err:     at com.katherine.du.network.OKHttpWrapper$1.onSuccess(OKHttpWrapper.java:95)W/System.err:     at com.katherine.du.network.OKHttpWrapper$1.onSuccess(OKHttpWrapper.java:83)W/System.err:     at com.lzy.okgo.adapter.CacheCall$3.run(CacheCall.java:247)W/System.err:     at android.os.Handler.handleCallback(Handler.java:725)W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:92)W/System.err:     at android.os.Looper.loop(Looper.java:137)W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:5046)W/System.err:     at java.lang.reflect.Method.invokeNative(Native Method)W/System.err:     at java.lang.reflect.Method.invoke(Method.java:511)W/System.err:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)W/System.err:     at dalvik.system.NativeStart.main(Native Method)W/System.err: Caused by: libcore.io.ErrnoException: open failed: EINVAL (Invalid argument)W/System.err:     at libcore.io.Posix.open(Native Method)W/System.err:     at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)W/System.err:     at java.io.File.createNewFile(File.java:941)W/System.err: ... 16 more

将图片文件写入外部存储时,路径中包含了 * 号,不过问题出现在联想A828T Android4.2.1 API17上,在小米MAX Android7.0 API24上无此问题。
此外,还有一些人讲到,:号也会报此错误。










阅读全文
1 0
原创粉丝点击