java.io.IOException: open failed: EINVAL (Invalid argument)
2017-10-25 10:27
387 查看
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上无此问题。
此外,还有一些人讲到,:号也会报此错误。
相关文章推荐
- java.io.IOException: open failed: EINVAL (Invalid argument)
- 加载网络图片保存到本地java.io.IOException: open failed: EINVAL (Invalid argument)
- java.io.IOException: open failed: EINVAL (Invalid argument)
- java.io.IOException: open failed: EINVAL (Invalid argument)
- java.io.IOException: open failed: EINVAL (Invalid argument)
- java.io.IOException: open failed: EINVAL (Invalid argument)
- java.io.IOException: open failed: EINVAL (Invalid argument)
- 创建文件报错 java.io.IOException: Invalid argument
- java.io.IOException: Invalid argument
- java.io.IOException: Invalid argument
- jar打包出现java.io.IOException: invalid header field 解决方案
- java.io.IOException: open failed: EACCES (Permission denied)问题解决
- android: java.io.IOException:open failed: ENOENT (No such file or directory)
- java.io.IOException: open failed: EACCES (Permission denied)问题解决
- 运行报错:java.io.IOException: invalid constant type: 15
- Play framework1.2.x java.io.IOException: invalid constant type: 18
- Play framework1.2.x java.io.IOException: invalid constant type: 18
- android java.io.FileNotFoundException: (Invalid argument)
- 严重: Error in dependencyCheck java.io.IOException: invalid header field(tomcat启动成功但是访问web项目404错误)
- java.io.IOException: Invalid header signature; read 0xE011BDBFEFBDBFEF, expected 0xE11AB1A1E011CFD0