當前位置:首頁 » 安卓系統 » androidstudio輸出

androidstudio輸出

發布時間: 2024-11-28 10:36:20

⑴ Android Studio的OutputStream輸出流輸出的文件在哪裡

1、書上沒說錯,確實在哪個目錄下

按照我的步驟做,然後去分析你的問題是什麼原因

1、在Applacation下寫

try {
FileOutputStream outputStream1 = getApplicationContext().openFileOutput("my.txt", Context.MODE_APPEND);
BufferedWriter outputStream=new BufferedWriter(new OutputStreamWriter(outputStream1));
outputStream.write("aaaaaaaaa");
outputStream.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}

2、使用模擬器運行,然後打開Device Monitor

4、如果還要問題,可以留下聯系方式或者追問

⑵ android studio怎麼在獲取對象後輸出對象內容

1、找到目錄的main先建立assets格式的文件夾
2、再把需要讀取的txt文件放入到該文件夾下。
3、在御磨利用代碼lnputStreaminputStream=getAssets().open(「txt文件的名稱」),就可以獲取鎮廳斗到輸出對象的內容了。
4、以上就是androidstudio怎麼在獲取對象後輸出對象內容伏鎮的步驟了。

熱點內容
光遇無翼號怎麼弄安卓 發布:2025-07-15 10:45:59 瀏覽:365
什麼是法人賬號密碼 發布:2025-07-15 10:34:59 瀏覽:876
編程題抽獎 發布:2025-07-15 10:34:00 瀏覽:629
linux手動編譯的內核怎麼刪 發布:2025-07-15 10:31:56 瀏覽:96
存儲行業發展趨勢 發布:2025-07-15 10:25:22 瀏覽:243
怎麼刪除配置提示 發布:2025-07-15 10:21:27 瀏覽:246
java深入學習 發布:2025-07-15 10:13:50 瀏覽:535
linux應用程序開發pdf 發布:2025-07-15 10:11:37 瀏覽:912
解壓冷知識 發布:2025-07-15 10:11:35 瀏覽:79
outlook郵件的伺服器是什麼 發布:2025-07-15 09:45:59 瀏覽:483