I'm developing an app that does some heavy html parsing. I want to make sure that the html and css have been properly formatted (I have strong reason to believe they are not). using logcat is not particularly helpuful since there is a great deal of text to sift through. So I thought why not write it to a file and then read that file (with my eyes) to see if it looks write. I believe adb pull is the command that will pull the file off of my emulator and onto my desktop. Windows 7 is my development operating system. When I use adb pull 'myfile.txt' I get an error that says my file doesn't exist. Here's the java function I wrote to create the text file:
private void cbdLog(String s){
File root = Environment.getExternalStorageDirectory();
if(root.canWrite()){
try {
File cbdLog = new File(root, "myfile.txt");
FileWriter logWriter = new FileWriter(cbdLog);
BufferedWriter out = new BufferedWriter(logWriter);
out.write(s);
out.close();
Log.d("YO!", "Log file has been written");
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
else{
Log.d("YO!", "Loggin failed");
}
}