爲什麼會出現此錯誤? 語法在標記「/」上出現錯誤,在此標記之後預期表達式。令牌「/」上的語法錯誤,此令牌之後的預期表達式
InputStream in = getResources().openRawResource(R.raw.msgn);
FileOutputStream out = new FileOutputStream(media/audio/notifications/); // Error is in this line
byte[] buff = new byte[1024];
int read = 0;
try {
while ((read = in.read(buff)) > 0) {
out.write(buff, 0, read);
}
} finally {
in.close();
out.close();
這條路徑代表一個目錄,而不是一個文件... –