我無法寫入android的外部存儲。我得到下面的堆棧跟蹤: 十月1日至14日:57:07.108:W/System.err的(17380):java.io.FileNotFoundException:android權限寫在外部存儲失敗
/mnt/media_rw/extSdCard/SterlingPixels.apk: open failed: EACCES (Permission denied)
01-14 10:57:07.108: W/System.err(17380): at libcore.io.IoBridge.open(IoBridge.java:456)
01-14 10:57:07.108: W/System.err(17380): at java.io.FileOutputStream.<init>(FileOutputStream.java:87)
01-14 10:57:07.108: W/System.err(17380): at java.io.FileOutputStream.<init>(FileOutputStream.java:127)
01-14 10:57:07.108: W/System.err(17380): at java.io.FileOutputStream.<init>(FileOutputStream.java:116)
01-14 10:57:07.108: W/System.err(17380): at com.codename1.impl.android.AndroidImplementation.createFileOuputStream(AndroidImplementation.java:4258)
01-14 10:57:07.108: W/System.err(17380): at com.codename1.impl.android.AndroidImplementation.openFileOutputStream(AndroidImplementation.java:4210)
01-14 10:57:07.108: W/System.err(17380): at com.codename1.io.FileSystemStorage.openOutputStream(FileSystemStorage.java:263)
01-14 10:57:07.108: W/System.err(17380): at com.codename1.io.ConnectionRequest.readResponse(ConnectionRequest.java:783)
01-14 10:57:07.108: W/System.err(17380): at com.codename1.io.ConnectionRequest.performOperation(ConnectionRequest.java:440)
01-14 10:57:07.108: W/System.err(17380): at com.codename1.io.NetworkManager$NetworkThread.run(NetworkManager.java:263)
01-14 10:57:07.108: W/System.err(17380): at com.codename1.impl.CodenameOneThread$1.run(CodenameOneThread.java:60)
01-14 10:57:07.108: W/System.err(17380): at java.lang.Thread.run(Thread.java:818)
01-14 10:57:07.108: W/System.err(17380): Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
01-14 10:57:07.108: W/System.err(17380): at libcore.io.Posix.open(Native Method)
01-14 10:57:07.108: W/System.err(17380): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
01-14 10:57:07.108: W/System.err(17380): at libcore.io.IoBridge.open(IoBridge.java:442)
01-14 10:57:07.108: W/System.err(17380): ... 11 more
我不能包括在建的提示"<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>"
,因爲這會導致構建合併清單失敗..所以我假設構建系統正確創建此權限。除非它不起作用。或者我錯了?
是否有可能您的設備連接爲USB - http://stackoverflow.com/questions/8854359/exception-open-failed-eacces-permission-denied-on-android – Chen