Я получил это странное исключение из ниоткуда, и любая помощь будет оценена. Журнал ошибок мне тоже не особо помог.
Я пытался переопределить «отсутствующий» ресурс, но он мало помог.
android.content.res.Resources$NotFoundException: Drawable com.blahblah.blahblah:dimen/design_snackbar_action_inline_max_width with resource ID #0x7f070075
Caused by: android.content.res.Resources$NotFoundException: Resource "com.blahhh.blahbalahh:dimen/design_snackbar_action_inline_max_width" (7f070075) is not a Drawable (color or path): TypedValue{t=0x5/d=0x8001 a=6 r=0x7f070075}
at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:814)
at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:659)
at android.content.res.Resources.getDrawableForDensity(Resources.java:906)
at android.content.res.Resources.getDrawable(Resources.java:845)
at android.content.Context.getDrawable(Context.java:687)
at androidx.core.content.ContextCompat.getDrawable(ContextCompat.java:454)
at androidx.appcompat.widget.ResourceManagerInternal.getDrawable(ResourceManagerInternal.java:144)
at androidx.appcompat.widget.ResourceManagerInternal.getDrawable(ResourceManagerInternal.java:132)
at androidx.appcompat.content.res.AppCompatResources.getDrawable(AppCompatResources.java:104)
at androidx.appcompat.widget.AppCompatImageHelper.setImageResource(AppCompatImageHelper.java:86)
at androidx.appcompat.widget.AppCompatImageButton.setImageResource(AppCompatImageButton.java:85)
at blah.UserViewHolder.bind(UserViewHolder.kt:60)
at blah.MyAdapter.onBindViewHolder(MyAdapter.kt:70)
at blah.MyAdapter.onBindViewHolder(MyAdapter.kt:10)
..and more
Вот файл Gradle:
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.core:core-ktx:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation "androidx.work:work-runtime-ktx:$work_version"
implementation "androidx.preference:preference-ktx:1.1.0"
implementation 'org.jsoup:jsoup:1.13.1'
implementation 'de.hdodenhof:circleimageview:3.1.0'
implementation "androidx.lifecycle:lifecycle-common-java8:2.2.0"
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
implementation "android.arch.lifecycle:extensions:1.1.1"
Часть трассировки стека:
После обновления файла Gradle
android.content.res.Resources$NotFoundException: Drawable blah:dimen/design_navigation_item_icon_padding with resource ID #0x7f070075
Caused by: android.content.res.Resources$NotFoundException: Resource "blah:dimen/design_navigation_item_icon_padding" (7f070075) is not a Drawable
dimen.xml
файл:
<resources xmlns:tools="http://schemas.android.com/tools">
<dimen name="fab_margin">16dp</dimen>
<dimen name="design_fab_image_size" tools:override="true">56dp</dimen>
</resources>
ЗАКЛЮЧИТЕЛЬНОЕ РЕДАКТИРОВАНИЕ:
Я решил эту проблему, сначала удалив приложение на эмуляторе и заново установив его через Android Studio. Я не знаю, почему проблема возникает в первую очередь, но я надеюсь, что это поможет кому-то с подобной проблемой.