-
[Gradle version 1.10 is required. Current version is 2.2.1. If using the gradle wrapper]
- instead of down-grade the gradle version, updating the requirement is a better solution.
- Extract a file:
adb pull sdcard/log.file
- Delete a file:
adb shell rm -r sdcard/log.file
- Cat a file:
adb -d shell cat /sdcard/chirpproc.txt
Put the following code fragment in the beginning of doInBackground: ```android.os.Debug.waitForDebugger();``` Then when you set a breakpoint in that thread; eclipse will find it.
Source directory difference error. Project Property -> Java Build Path -> Source -> Add Foler /src/main/java -> remove the conflicting one.
public static void appendlog(String text){ File logFile = new File("sdcard/log.file"); if (!logFile.exists()) { try { logFile.createNewFile(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } try { //BufferedWriter for performance, true to set append to file flag BufferedWriter buf = new BufferedWriter(new FileWriter(logFile, true)); buf.append(text); buf.newLine(); buf.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }