Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash android.content.res.Resources$NotFoundException in setWeatherImage() #1196

Closed
aaronbrethorst opened this issue Apr 2, 2024 · 0 comments · Fixed by #1198
Closed

Crash android.content.res.Resources$NotFoundException in setWeatherImage() #1196

aaronbrethorst opened this issue Apr 2, 2024 · 0 comments · Fixed by #1198

Comments

@aaronbrethorst
Copy link
Member

We're seeing lots of crashes in 2.13.0 from attempting to load what the app thinks is a missing image resource.

Exception android.content.res.Resources$NotFoundException: Drawable com.joulespersecond.seattlebusbot:drawable/clear_night with resource ID #0x7f08006b
Caused by: android.content.res.Resources$NotFoundException: File res/ry.xml from drawable resource ID #0x7f08006b
  at android.content.res.ResourcesImpl.loadDrawableForCookie (ResourcesImpl.java:896)
  at android.content.res.ResourcesImpl.loadDrawable (ResourcesImpl.java:690)
  at android.content.res.Resources.loadDrawable (Resources.java:993)
  at android.content.res.Resources.getDrawableForDensity (Resources.java:983)
  at android.content.res.Resources.getDrawable (Resources.java:922)
  at android.content.Context.getDrawable (Context.java:753)
  at androidx.core.content.ContextCompat$Api21Impl.getDrawable
  at androidx.core.content.ContextCompat.getDrawable
  at androidx.appcompat.widget.ResourceManagerInternal.getDrawable (SourceFile)
  at androidx.appcompat.widget.ResourceManagerInternal.getDrawable (SourceFile)
  at androidx.appcompat.content.res.AppCompatResources.getDrawable
  at androidx.appcompat.widget.AppCompatImageHelper.setImageResource
  at androidx.appcompat.widget.AppCompatImageView.setImageResource
  at org.onebusaway.android.ui.weather.WeatherUtils.setWeatherImage
  at org.onebusaway.android.ui.HomeActivity.setWeatherData
  at org.onebusaway.android.ui.HomeActivity.onWeatherResponseReceived
  at org.onebusaway.android.io.request.weather.WeatherRequestTask.onPostExecute (SourceFile)
  at org.onebusaway.android.io.request.weather.WeatherRequestTask.onPostExecute (SourceFile)
  at android.os.AsyncTask.finish (AsyncTask.java:771)
  at android.os.AsyncTask.access$900 (AsyncTask.java:199)
  at android.os.AsyncTask$InternalHandler.handleMessage (AsyncTask.java:788)
  at android.os.Handler.dispatchMessage (Handler.java:111)
  at android.os.Looper.loopOnce (Looper.java:238)
  at android.os.Looper.loop (Looper.java:357)
  at android.app.ActivityThread.main (ActivityThread.java:8098)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:548)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1026)
Caused by android.view.InflateException: Class not found x
  at android.graphics.drawable.DrawableInflater.inflateFromClass (DrawableInflater.java:225)
  at android.graphics.drawable.DrawableInflater.inflateFromXmlForDensity (DrawableInflater.java:142)
  at android.graphics.drawable.Drawable.createFromXmlInnerForDensity (Drawable.java:1399)
  at android.graphics.drawable.Drawable.createFromXmlForDensity (Drawable.java:1358)
  at android.content.res.ResourcesImpl.loadXmlDrawable (ResourcesImpl.java:928)
  at android.content.res.ResourcesImpl.loadDrawableForCookie (ResourcesImpl.java:882)
Caused by java.lang.ClassNotFoundException: Didn't find class "x" on path: DexPathList[[zip file "/data/app/~~_70XByjdDVm2-J6YLBb0JQ==/com.joulespersecond.seattlebusbot-viaFcEifp5MXFy--TEcy6A==/base.apk"],nativeLibraryDirectories=[/data/app/~~_70XByjdDVm2-J6YLBb0JQ==/com.joulespersecond.seattlebusbot-viaFcEifp5MXFy--TEcy6A==/lib/arm, /system/lib, /system_ext/lib]]
  at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:218)
  at java.lang.ClassLoader.loadClass (ClassLoader.java:379)
  at java.lang.ClassLoader.loadClass (ClassLoader.java:312)
  at android.graphics.drawable.DrawableInflater.inflateFromClass (DrawableInflater.java:206)
amrhossamdev added a commit to amrhossamdev/onebusaway-android that referenced this issue Apr 2, 2024
Signed-off-by: Amr Hossam <amrhossam.dev@gmail.com>
amrhossamdev added a commit to amrhossamdev/onebusaway-android that referenced this issue Apr 2, 2024
Signed-off-by: Amr Hossam <amrhossam.dev@gmail.com>
aaronbrethorst pushed a commit that referenced this issue Apr 11, 2024
* Fixed #1196 - Loading weather image.
* Fixed #1196 - Adjusting scale if image changed

Signed-off-by: Amr Hossam <amrhossam.dev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant