안드로이드 개발 질문/답변
(글 수 45,052)
sdcard 부분에서 많은 글들이 올라와 있엇는데 저도 이것저것 고쳐보았는데 잘 안되네요

public class BlueToothCertificateTest extends Activity {
/** Called when the activity is first created. */
BlueToothCertificateTest bt = new BlueToothCertificateTest();
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
TextView tv = new TextView(this);
try{
tv.setText(bt.readtest());
}catch(IOException e){}
setContentView(tv);
}
private String readtest() throws IOException {
String test;
FileInputStream textfis = new FileInputStream("/scard/textTest.txt");
BufferedInputStream textbis = new BufferedInputStream(textfis);
test=textbis.read()+"";
return test ;
}
}
코드 상의 에러는 없는데, 파일 불러오는데서 문제가 된건지 LogCat 에서 StackOverflowError 가 나오네요.
txt파일 여러 방법으로 하는방안이 있는데, 최종목표에서 가는 중간 단계라서 헤메고 있네요.




