Re: [問題] 關於在SD卡裡面建立資料夾
我大概可能也遇到跟這位大大一樣的問題QQ
我在new htc one上 (4.4.2)建立資料夾時候失敗
可是在其他手機卻成功 orz
那位大大說是手機的問題
那請問要怎樣才能成功建立資料夾呢?
話說htc new one升到4.3以後,Eclipse就讀不到手機了orz
這跟我是用手動安裝APK到手機上有關嗎?
謝謝!
附上程式碼:
public static String getAppDirectory(){
return Environment.getExternalStorageDirectory() + File.separator +
"AppFolder" + File.separator + "images";
}
public static File getOutputMediaFile(Context context){
File mediaStorageDir = new File( getVideoDirectory());
if( !mediaStorageDir.exists()){
if( !mediaStorageDir.mkdirs()){
return null;
}
}
}
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 211.21.125.247
... 已解決
http://developer.android.com/guide/topics/manifest/
uses-permission-element.html
這次不是被 android document 陰了就是被 HTC陰了!
明明 document說
”This way, beginning with API level 19, the system will no longer grant your
app the WRITE_EXTERNAL_STORAGE permission.”
htc 4.4.2 api 19 的情況下還是要此 permission啊!
把 permission的 android:maxSdkVersion="18" 拿掉就ok了 G________G"
※ 編輯: issuemylove 來自: 211.21.125.247 (03/12 16:37)
推
03/12 22:21, , 1F
03/12 22:21, 1F
→
03/12 22:46, , 2F
03/12 22:46, 2F
→
03/12 22:47, , 3F
03/12 22:47, 3F
→
03/13 12:24, , 4F
03/13 12:24, 4F
→
03/13 12:24, , 5F
03/13 12:24, 5F
推
03/13 20:40, , 6F
03/13 20:40, 6F
→
03/14 09:55, , 7F
03/14 09:55, 7F
→
03/14 09:55, , 8F
03/14 09:55, 8F
→
03/20 19:48, , 9F
03/20 19:48, 9F
討論串 (同標題文章)
完整討論串 (本文為第 2 之 2 篇):