하고재비
[Android] android.content.res.Resources$NotFoundException: String resource ID #0x1 본문
Android
[Android] android.content.res.Resources$NotFoundException: String resource ID #0x1
DeadDE 2018. 1. 3. 11:08EditText에 .setText를 int로 하니 에러...
|
1
2
3
4
5
6
7
8
9
10 |
div.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
int num1 = Integer.parseInt(input_number1.getText().toString());
int num2 = Integer.parseInt(input_number2.getText().toString());
int res = div(num1,num2);
String res = Integer.toString(plus(num1,num2));
result.setText(res);
}
}); |
cs |
String 으로 형변환후 사용가능^^
'Android' 카테고리의 다른 글
| [Android]탭레이아웃 Tab Layout (0) | 2018.02.11 |
|---|---|
| [Android] 클래스 이름 불러와 인텐트로 바로써먹어보자 (0) | 2018.01.22 |
| [Android] 현재 실행중인 액티비티 가져오기 (0) | 2018.01.19 |
| [Android] Recycler View, StaggeredGrid (0) | 2018.01.17 |
| [Android] ListFragment (0) | 2018.01.10 |
Comments