本人基础不好 ,所以还是收集下比较好,不要见笑
private String textName = "json.txt";outPath = Environment.getExternalStorageDirectory().getPath() + "/Android/data/copyzip/";
/**
* 吧json.txt读出来 读成一个String * * */ try { StringBuffer sb = new StringBuffer(); File file = new File(outPath + "/" + textName); BufferedReader br = new BufferedReader(new FileReader(file)); String line = ""; while ((line = br.readLine()) != null) { sb.append(line); } jsonText = sb.toString(); br.close(); } catch (IOException e) { e.printStackTrace(); }