Java tutorial
//package com.java2s; import android.os.Environment; import java.io.File; import java.io.PrintWriter; public class Main { public static void clearLog() { File logFile = new File(Environment.getExternalStorageDirectory() + "/clr_log.file"); PrintWriter writer; try { writer = new PrintWriter(logFile); writer.close(); } catch (Exception e) { e.printStackTrace(); } } }