我正在尝试使用ImageLoader来获取下面的两个图像,并且我获得了EACCES(权限被拒绝)。我错过了什么吗?
在我的清单中我有:
<uses-permission android:name="android.permission.INTERNET" />
网址:
http://projectcaruso.com/android/com.projectcaruso/idea/dumpfolder/345
http://projectcaruso.com/android/com.projectcaruso/idea/dumpfolder/342
我称之为:
LocalImageLoader imageLoader=new LocalImageLoader(FeedActivity.this);
imageLoader.DisplayImage(URL, image);
02-14 13:39:51.270: W/System.err(9446): java.io.FileNotFoundException: /storage/emulated/0/LazyList/-649435551: open failed: EACCES (Permission denied)
02-14 13:39:51.270: W/System.err(9446): at libcore.io.IoBridge.open(IoBridge.java:409)
02-14 13:39:51.270: W/System.err(9446): at java.io.FileOutputStream.<init>(FileOutputStream.java:88)
02-14 13:39:51.270: W/System.err(9446): at java.io.FileOutputStream.<init>(FileOutputStream.java:73)
02-14 13:39:51.270: W/System.err(9446): at com.projectCaruso.idea.LocalImageLoader.getBitmap(LocalImageLoader.java:72)
02-14 13:39:51.270: W/System.err(9446): at com.projectCaruso.idea.LocalImageLoader.access$0(LocalImageLoader.java:54)
02-14 13:39:51.270: W/System.err(9446): at com.projectCaruso.idea.LocalImageLoader$PhotosLoader.run(LocalImageLoader.java:132)
02-14 13:39:51.270: W/System.err(9446): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
02-14 13:39:51.270: W/System.err(9446): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
02-14 13:39:51.270: W/System.err(9446): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
02-14 13:39:51.270: W/System.err(9446): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
02-14 13:39:51.270: W/System.err(9446): at java.lang.Thread.run(Thread.java:841)
02-14 13:39:51.270: W/System.err(9446): Caused by: libcore.io.ErrnoException: open failed: EACCES (Permission denied)
02-14 13:39:51.270: W/System.err(9446): at libcore.io.Posix.open(Native Method)
02-14 13:39:51.270: W/System.err(9446): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
02-14 13:39:51.270: W/System.err(9446): at libcore.io.IoBridge.open(IoBridge.java:393)
02-14 13:39:51.270: W/System.err(9446): ... 10 more
02-14 13:39:51.290: W/System.err(9446): java.io.FileNotFoundException: /storage/emulated/0/LazyList/-649435554: open failed: EACCES (Permission denied)
02-14 13:39:51.290: W/System.err(9446): at libcore.io.IoBridge.open(IoBridge.java:409)
02-14 13:39:51.290: W/System.err(9446): at java.io.FileOutputStream.<init>(FileOutputStream.java:88)
02-14 13:39:51.290: W/System.err(9446): at java.io.FileOutputStream.<init>(FileOutputStream.java:73)
02-14 13:39:51.290: W/System.err(9446): at com.projectCaruso.idea.LocalImageLoader.getBitmap(LocalImageLoader.java:72)
02-14 13:39:51.290: W/System.err(9446): at com.projectCaruso.idea.LocalImageLoader.access$0(LocalImageLoader.java:54)
02-14 13:39:51.290: W/System.err(9446): at com.projectCaruso.idea.LocalImageLoader$PhotosLoader.run(LocalImageLoader.java:132)
02-14 13:39:51.300: W/System.err(9446): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
02-14 13:39:51.300: W/System.err(9446): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
02-14 13:39:51.300: W/System.err(9446): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
02-14 13:39:51.300: W/System.err(9446): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
02-14 13:39:51.300: W/System.err(9446): at java.lang.Thread.run(Thread.java:841)
02-14 13:39:51.300: W/System.err(9446): Caused by: libcore.io.ErrnoException: open failed: EACCES (Permission denied)
02-14 13:39:51.300: W/System.err(9446): at libcore.io.Posix.open(Native Method)
02-14 13:39:51.300: W/System.err(9446): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
02-14 13:39:51.300: W/System.err(9446): at libcore.io.IoBridge.open(IoBridge.java:393)
02-14 13:39:51.300: W/System.err(9446): ... 10 more
02-14 13:39:51.310: W/System.err(9446): java.io.FileNotFoundException: /storage/emulated/0/LazyList/-649435551: open failed: EACCES (Permission denied)
02-14 13:39:51.310: W/System.err(9446): at libcore.io.IoBridge.open(IoBridge.java:409)
02-14 13:39:51.310: W/System.err(9446): at java.io.FileOutputStream.<init>(FileOutputStream.java:88)
02-14 13:39:51.310: W/System.err(9446): at java.io.FileOutputStream.<init>(FileOutputStream.java:73)
02-14 13:39:51.310: W/System.err(9446): at com.projectCaruso.idea.LocalImageLoader.getBitmap(LocalImageLoader.java:72)
02-14 13:39:51.310: W/System.err(9446): at com.projectCaruso.idea.LocalImageLoader.access$0(LocalImageLoader.java:54)
02-14 13:39:51.310: W/System.err(9446): at com.projectCaruso.idea.LocalImageLoader$PhotosLoader.run(LocalImageLoader.java:132)
02-14 13:39:51.310: W/System.err(9446): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
02-14 13:39:51.310: W/System.err(9446): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
02-14 13:39:51.310: W/System.err(9446): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
02-14 13:39:51.310: W/System.err(9446): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
02-14 13:39:51.310: W/System.err(9446): at java.lang.Thread.run(Thread.java:841)
02-14 13:39:51.310: W/System.err(9446): Caused by: libcore.io.ErrnoException: open failed: EACCES (Permission denied)
02-14 13:39:51.310: W/System.err(9446): at libcore.io.Posix.open(Native Method)
02-14 13:39:51.310: W/System.err(9446): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
02-14 13:39:51.310: W/System.err(9446): at libcore.io.IoBridge.open(IoBridge.java:393)
02-14 13:39:51.310: W/System.err(9446): ... 10 more
02-14 13:39:51.361: W/System.err(9446): java.io.FileNotFoundException: /storage/emulated/0/LazyList/-649435554: open failed: EACCES (Permission denied)
02-14 13:39:51.361: W/System.err(9446): at libcore.io.IoBridge.open(IoBridge.java:409)
02-14 13:39:51.361: W/System.err(9446): at java.io.FileOutputStream.<init>(FileOutputStream.java:88)
02-14 13:39:51.361: W/System.err(9446): at java.io.FileOutputStream.<init>(FileOutputStream.java:73)
02-14 13:39:51.361: W/System.err(9446): at com.projectCaruso.idea.LocalImageLoader.getBitmap(LocalImageLoader.java:72)
02-14 13:39:51.361: W/System.err(9446): at com.projectCaruso.idea.LocalImageLoader.access$0(LocalImageLoader.java:54)
02-14 13:39:51.361: W/System.err(9446): at com.projectCaruso.idea.LocalImageLoader$PhotosLoader.run(LocalImageLoader.java:132)
02-14 13:39:51.361: W/System.err(9446): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
02-14 13:39:51.361: W/System.err(9446): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
02-14 13:39:51.361: W/System.err(9446): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
02-14 13:39:51.361: W/System.err(9446): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
02-14 13:39:51.361: W/System.err(9446): at java.lang.Thread.run(Thread.java:841)
02-14 13:39:51.361: W/System.err(9446): Caused by: libcore.io.ErrnoException: open failed: EACCES (Permission denied)
02-14 13:39:51.361: W/System.err(9446): at libcore.io.Posix.open(Native Method)
02-14 13:39:51.361: W/System.err(9446): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
02-14 13:39:51.361: W/System.err(9446): at libcore.io.IoBridge.open(IoBridge.java:393)
02-14 13:39:51.361: W/System.err(9446): ... 10 more
02-14 13:39:51.631: W/System.err(9446): java.io.FileNotFoundException: /storage/emulated/0/LazyList/-649435551: open failed: EACCES (Permission denied)
02-14 13:39:51.631: W/System.err(9446): at libcore.io.IoBridge.open(IoBridge.java:409)
02-14 13:39:51.631: W/System.err(9446): at java.io.FileOutputStream.<init>(FileOutputStream.java:88)
02-14 13:39:51.631: W/System.err(9446): at java.io.FileOutputStream.<init>(FileOutputStream.java:73)
02-14 13:39:51.631: W/System.err(9446): at com.projectCaruso.idea.LocalImageLoader.getBitmap(LocalImageLoader.java:72)
02-14 13:39:51.631: W/System.err(9446): at com.projectCaruso.idea.LocalImageLoader.access$0(LocalImageLoader.java:54)
02-14 13:39:51.631: W/System.err(9446): at com.projectCaruso.idea.LocalImageLoader$PhotosLoader.run(LocalImageLoader.java:132)
02-14 13:39:51.631: W/System.err(9446): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
02-14 13:39:51.631: W/System.err(9446): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
02-14 13:39:51.631: W/System.err(9446): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
02-14 13:39:51.631: W/System.err(9446): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
02-14 13:39:51.631: W/System.err(9446): at java.lang.Thread.run(Thread.java:841)
02-14 13:39:51.631: W/System.err(9446): Caused by: libcore.io.ErrnoException: open failed: EACCES (Permission denied)
02-14 13:39:51.631: W/System.err(9446): java.io.FileNotFoundException: /storage/emulated/0/LazyList/-649435554: open failed: EACCES (Permission denied)
02-14 13:39:51.631: W/System.err(9446): at libcore.io.Posix.open(Native Method)
02-14 13:39:51.631: W/System.err(9446): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
02-14 13:39:51.641: W/System.err(9446): at libcore.io.IoBridge.open(IoBridge.java:393)
02-14 13:39:51.641: W/System.err(9446): ... 10 more
02-14 13:39:51.641: W/System.err(9446): java.io.FileNotFoundException: /storage/emulated/0/LazyList/-649435554: open failed: EACCES (Permission denied)
02-14 13:39:51.641: W/System.err(9446): at libcore.io.IoBridge.open(IoBridge.java:409)java.io.FileNotFoundException: /storage/emulated/0/LazyList/-649435551: open failed: EACCES (Permission denied)
02-14 13:39:51.641: W/System.err(9446): at libcore.io.IoBridge.open(IoBridge.java:409)
02-14 13:39:51.641: W/System.err(9446): at java.io.FileOutputStream.<init>(FileOutputStream.java:88)
02-14 13:39:51.641: W/System.err(9446): at java.io.FileOutputStream.<init>(FileOutputStream.java:73)
02-14 13:39:51.641: W/System.err(9446): at com.projectCaruso.idea.LocalImageLoader.getBitmap(LocalImageLoader.java:72)
02-14 13:39:51.641: W/System.err(9446): at com.projectCaruso.idea.LocalImageLoader.access$0(LocalImageLoader.java:54)
02-14 13:39:51.641: W/System.err(9446): at com.projectCaruso.idea.LocalImageLoader$PhotosLoader.run(LocalImageLoader.java:132)
02-14 13:39:51.641: W/System.err(9446): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
02-14 13:39:51.641: W/System.err(9446): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
02-14 13:39:51.641: W/System.err(9446): at at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)libcore.io.IoBridge.open(IoBridge.java:409)
02-14 13:39:51.641: W/System.err(9446): at java.io.FileOutputStream.<init>(FileOutputStream.java:88)
02-14 13:39:51.641: W/System.err(9446): at java.io.FileOutputStream.<init>(FileOutputStream.java:73)
02-14 13:39:51.641: W/System.err(9446): at com.projectCaruso.idea.LocalImageLoader.getBitmap(LocalImageLoader.java:72)
02-14 13:39:51.641: W/System.err(9446): at com.projectCaruso.idea.LocalImageLoader.access$0(LocalImageLoader.java:54)
02-14 13:39:51.641: W/System.err(9446): at com.projectCaruso.idea.LocalImageLoader$PhotosLoader.run(LocalImageLoader.java:132)
02-14 13:39:51.641: W/System.err(9446): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
02-14 13:39:51.641: W/System.err(9446): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
02-14 13:39:51.641: W/System.err(9446): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
02-14 13:39:51.641: W/System.err(9446): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
02-14 13:39:51.641: W/System.err(9446): at java.lang.Thread.run(Thread.java:841)
02-14 13:39:51.641: W/System.err(9446): Caused by: libcore.io.ErrnoException: open failed: EACCES (Permission denied)
02-14 13:39:51.641: W/System.err(9446): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
02-14 13:39:51.641: W/System.err(9446): at java.lang.Thread.run(Thread.java:841)
02-14 13:39:51.641: W/System.err(9446): Caused by: libcore.io.ErrnoException: open failed: EACCES (Permission denied)
02-14 13:39:51.641: W/System.err(9446): at java.io.FileOutputStream.<init>(FileOutputStream.java:88)
02-14 13:39:51.641: W/System.err(9446): at java.io.FileOutputStream.<init>(FileOutputStream.java:73)
02-14 13:39:51.651: W/System.err(9446): at at libcore.io.Posix.open(Native Method)
02-14 13:39:51.651: W/System.err(9446): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
02-14 13:39:51.651: W/System.err(9446): at libcore.io.IoBridge.open(IoBridge.java:393)
02-14 13:39:51.651: W/System.err(9446): ... 10 more
02-14 13:39:51.651: W/System.err(9446): at libcore.io.Posix.open(Native Method)
02-14 13:39:51.651: W/System.err(9446): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
02-14 13:39:51.651: W/System.err(9446): at libcore.io.IoBridge.open(IoBridge.java:393)
02-14 13:39:51.651: W/System.err(9446): ... 10 more
02-14 13:39:51.651: W/System.err(9446): com.projectCaruso.idea.LocalImageLoader.getBitmap(LocalImageLoader.java:72)
02-14 13:39:51.651: W/System.err(9446): at com.projectCaruso.idea.LocalImageLoader.access$0(LocalImageLoader.java:54)
02-14 13:39:51.651: W/System.err(9446): at com.projectCaruso.idea.LocalImageLoader$PhotosLoader.run(LocalImageLoader.java:132)
02-14 13:39:51.651: W/System.err(9446): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
02-14 13:39:51.651: W/System.err(9446): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
02-14 13:39:51.651: W/System.err(9446): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
02-14 13:39:51.651: W/System.err(9446): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
02-14 13:39:51.651: W/System.err(9446): at java.lang.Thread.run(Thread.java:841)
02-14 13:39:51.651: W/System.err(9446): Caused by: libcore.io.ErrnoException: open failed: EACCES (Permission denied)
02-14 13:39:51.651: W/System.err(9446): at libcore.io.Posix.open(Native Method)
02-14 13:39:51.651: W/System.err(9446): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
02-14 13:39:51.651: W/System.err(9446): at libcore.io.IoBridge.open(IoBridge.java:393)
02-14 13:39:51.651: W/System.err(9446): ... 10 more
答案 0 :(得分:5)
因为你收到了这条消息
java.io.FileNotFoundException: /storage/emulated/0/LazyList/-649435551: open failed: EACCES (Permission denied)
你有吗?
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />