Неустрашимое исключение: android.content.res.Resources$NotFoundException: Drawable org.radarcns.detail:drawable/status_sAndroid

Форум для тех, кто программирует под Android
Ответить Пред. темаСлед. тема
Anonymous
 Неустрашимое исключение: android.content.res.Resources$NotFoundException: Drawable org.radarcns.detail:drawable/status_s

Сообщение Anonymous »

Я получаю исключение:

Код: Выделить всё

Fatal Exception: android.content.res.Resources$NotFoundException: Drawable org.radarcns.detail:drawable/status_searching with resource ID #0x7f080130

Caused by android.content.res.Resources$NotFoundException: Resource "org.radarcns.detail:drawable/status_searching" (7f080130) is not a Drawable (color or path): TypedValue{t=0x1/d=0x7f080130 a=11 r=0x7f080130}
at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:828)
at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:673)
at android.content.res.Resources.loadDrawable(Resources.java:1002)
at android.content.res.Resources.getDrawableForDensity(Resources.java:992)
at android.content.res.Resources.getDrawable(Resources.java:931)
at android.content.Context.getDrawable(Context.java:810)
at androidx.core.content.ContextCompat$Api21Impl.getDrawable(ContextCompat.java:1049)
at androidx.core.content.ContextCompat.getDrawable(ContextCompat.java:485)
at androidx.appcompat.widget.ResourceManagerInternal.getDrawable(ResourceManagerInternal.java:149)
at androidx.appcompat.widget.ResourceManagerInternal.getDrawable(ResourceManagerInternal.java:137)
at androidx.appcompat.content.res.AppCompatResources.getDrawable(AppCompatResources.java:66)
at androidx.appcompat.widget.AppCompatImageHelper.setImageResource(AppCompatImageHelper.java:91)
at androidx.appcompat.widget.AppCompatImageView.setImageResource(AppCompatImageView.java:102)
at org.radarcns.detail.SourceRowView$updateSourceStatus$1.invoke(SourceRowView.kt:155)
at org.radarcns.detail.SourceRowView$updateSourceStatus$1.invoke(SourceRowView.kt:152)
at org.radarbase.android.util.ChangeApplier.applyIfChanged(ChangeApplier.kt:72)
at org.radarcns.detail.SourceRowView.updateSourceStatus(SourceRowView.kt:152)
at org.radarcns.detail.SourceRowView.display(SourceRowView.kt:148)
at org.radarcns.detail.MainActivityViewImpl.update$lambda$6(MainActivityViewImpl.kt:157)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7918)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

Код в SourceRowView, в котором я получаю эту ошибку, выглядит следующим образом:

Код: Выделить всё

    private val mStatusIcon: ImageView = findViewById(R.id.status_icon)
mStatusIcon.setImageResource(R.drawable.status_searching)
Где R.drawable.status_searching присутствует в src/main/res/drawable, который содержит: Теперь @drawable/ic_searching.png в формате png присутствует в drawable-hdpi, drawable-mdpi, drawable-xhdpi и drawable-xxhdpi.
Даже все ресурсы присутствуют, это дает ResourceNotFound, я не понимаю, почему это происходит?


Подробнее здесь: https://stackoverflow.com/questions/785 ... able-org-r
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «Android»