Android

안드로이드[RemoteServiceException] android.widget.ImageView doesn’t have method: setText(interface java.lang.CharSequence)

알수 없는 오류가 발생했다. starlight라는 브랜드 의 안드로이드8이 설치된 휴대폰에서 오류가 발생했다는 보고서 올라왔다. 백그라운드 서비스 실행 후 포그라운드 서비스로 올릴 때 리모트뷰를 사용하게 되어있다.


오류내용은 다음과 같다. 내가 만든 RemoteViews에 ImageView를 사용하고 있지만 그 어디에도 setText()메소드를 사용하여 이미지뷰에 텍스트 값을 적용하고 있지않다. 그런데 어떻게 이런 오류는 발생하는가?

Fatal Exception: android.app.RemoteServiceException: 
Bad notification posted from package com.test: 
Couldn't inflate contentViewsandroid.widget.RemoteViews$ActionException: 
view: android.widget.ImageView doesn't have method: setText(interface java.lang.CharSequence)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1851)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:164)
       at android.app.ActivityThread.main(ActivityThread.java:6582)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857)

이미지뷰에 setText()라니!! xml레이아웃에서도 찾아보고 백앤드 단에서 찾아보았으나 아무리 뒤져보아도 오류에서 보고된 내용은 찾을 수 없다. 일단 닫아버렸다. 같은 오류 또 올라온다면 찾아보련다.

 

또 다른 폰에서 같은 증상이 발생되었다. 이번엔 SHARP 브랜드의 안드로이드10이 설치된 AQUOS R2폰이다.


백그라운드 서비스를 최근에 작업한 기록이 없음에도 최근에 올라오는 오류인데…뭘까..

Leave a Reply

error: Content is protected !!