1
public static String openAssetFile(Context ctx) {
BufferedReader br=new BufferedReader(new InputStreamReader(ctx.getResources().openRawResource(R.raw.hung)));
String readLine;
String sout="";
try {
while ((readLine = br.readLine()) != null) {
sout+=readLine;
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return sout;
}
這不工作,它的凍結,我的xml文件大約300 kb。Android java資產 - >快
我該如何處理?