java.io.FileNotFoundException: /mnt/sdcard/yuan.txt (Permission denied) at org.apache.harmony.luni.p

11-03 07:00:38.908: WARN/System.err(5258): java.io.FileNotFoundException: /mnt/sdcard/Pictures/aa.jpg (Permission denied)
11-03 07:00:38.918: WARN/System.err(5258):     at org.apache.harmony.luni.platform.OSFileSystem.open(Native Method)
11-03 07:00:38.918: WARN/System.err(5258):     at dalvik.system.BlockGuard$WrappedFileSystem.open(BlockGuard.java:232)
11-03 07:00:38.939: WARN/System.err(5258):     at java.io.FileOutputStream.(FileOutputStream.java:94)
11-03 07:00:38.939: WARN/System.err(5258):     at java.io.FileOutputStream.(FileOutputStream.java:66)
11-03 07:00:38.948: WARN/System.err(5258):     at com.szy.activity.ShowListActivity.createExternalStoragePublicPicture(ShowListActivity.java:75)
11-03 07:00:39.028: WARN/System.err(5258):     at com.szy.activity.ShowListActivity$1.onClick(ShowListActivity.java:43)
11-03 07:00:39.028: WARN/System.err(5258):     at android.view.View.performClick(View.java:2485)
11-03 07:00:39.041: WARN/System.err(5258):     at android.view.View$PerformClick.run(View.java:9080)
11-03 07:00:39.048: WARN/System.err(5258):     at android.os.Handler.handleCallback(Handler.java:587)
11-03 07:00:39.048: WARN/System.err(5258):     at android.os.Handler.dispatchMessage(Handler.java:92)
11-03 07:00:39.048: WARN/System.err(5258):     at android.os.Looper.loop(Looper.java:123)
11-03 07:00:39.048: WARN/System.err(5258):     at android.app.ActivityThread.main(ActivityThread.java:3683)
11-03 07:00:39.048: WARN/System.err(5258):     at java.lang.reflect.Method.invokeNative(Native Method)
11-03 07:00:39.048: WARN/System.err(5258):     at java.lang.reflect.Method.invoke(Method.java:507)
11-03 07:00:39.048: WARN/System.err(5258):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
11-03 07:00:39.048: WARN/System.err(5258):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)

11-03 07:00:39.048: WARN/System.err(5258):     at dalvik.system.NativeStart.main(Native Method)

发生上面的错误是因为缺少权限 
在AndroidManifest.xml中的标签内添加上 
  就可以解决了主要是没有操作权限

或者是权限写错了,

你可能感兴趣的:(Android)