본문 바로가기

programming/java, Spring, android, js

[Android] [Error] android.content.res.Resources$NotFoundException: String resource ID


Object 형의 맵에 글로벌 데이터를 임시저장해 사용할 때가 있었다.

SharedProperty 나 싱글턴으로 리소스를 잠깐 사용할 때에 썼다.


그런데 한 두번씩 이런 오류가 나오면 미칠것 같다.


android.content.res.Resources$NotFoundException: String resource ID

그런 리소스 못찾았다는 것이다.

문자열 또는 문자스트림만을 입력으로 갖는 TextView 나 EditText 같은 것에 강제로 int 나 Object 를 입력하면 이런 오류를 주고 있다.

입력전에 형변환을 꼭 하도록 하자.


참고 : http://jcwithus.tistory.com/37

반응형