我正在使用以下代码并使用apache commons库将一个文件(临时音频文件)从源文件夹复制到目标文件夹TT_1A.
码:
button1_save.setOnClickListener(new OnClickListener()
{
public void onClick(View v)
{
String sourcePath = Environment.getExternalStorageDirectory().getAbsolutePath() + "/TT/tt_temp.3gp";
File source = new File(sourcePath);
String descPath = Environment.getExternalStorageDirectory().getAbsolutePath() + "/TT/tt_1A.3gp";
File desc = new File(descPath);
try
{
FileUtils.copyDirectory(source,desc);
}
catch (IOException e)
{
e.printStackTrace();
}
}
});
Apache Commons:
题:
我使用了FileUtils函数来复制临时文件并粘贴到desc文件夹中作为TT_1A.然而logcat报告错误,具有以下细节:
10-17 00:41:04.260: E/AndroidRuntime(27450): FATAL EXCEPTION: