-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fatal Exception: android.content.res.Resources$NotFoundException: Resource ID #532
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Any update? |
still receiving this error: |
It also occurs in these devices. Nexus 4 (Android 8.10) |
Any Updates on this? Even I'm getting the same crash in VIVO devices Any solution available? |
It looks like the root cause of this may be that in The Android resources docs say:
I'm guessing in some cases Android is trying to load the resources at densities other than A counter argument to this theory is that further down the docs also say:
A potential complicating factor is that So, perhaps the deprecated implementation isn't properly handling resource scaling in all cases, even though the Android docs say it should work? Instead of adding additional PNGs in the default folder which would increase the size of the library, I'm going to try fixing this at first by changing to using I'll open a PR with this fix shortly. If this doesn't fix it, we can add the PNGs in the default resource directory. |
* googleOrigin/master: (107 commits) Remove unnecessary interface method public modifiers. (googlemaps#587) Remove unnecessary primitives boxing. (googlemaps#586) Fix googlemaps#575 - Change Travis config, use matrix of API emulators (googlemaps#585) Retain the bitmap cache (googlemaps#381) Made GeoJsonParser with parseGeometry public to use the parser standalone. (googlemaps#492) Fix googlemaps#570 - Use project GitHub URL for remote KML loading demo (googlemaps#581) Bump Gradle plugin for Android Studio v3.5.2 (googlemaps#574) Fix googlemaps#575 - Use API 26 emulator instead of API 28 (googlemaps#576) Fix googlemaps#371 - Run emulator-based unit tests on Travis (googlemaps#573) Fix googlemaps#371 - Run emulator-based unit tests on Travis (googlemaps#573) Fix googlemaps#532 - Use ContextCompat to load drawable resources for scaling (googlemaps#571) Change test methods visibility (googlemaps#569) Release 0.6.2 (googlemaps#568) Demo clustering with ViewModel (googlemaps#506) Differentiate between initial start and configuration change restore (googlemaps#567) Fix wrapping around IDL (googlemaps#564) Update Gradle wrapper to 5.6.3 (googlemaps#566) Add MaxIntensity functionality for user defined intensities on HeatMapTiles (googlemaps#499) Use float zoom to calculate visible bounds (googlemaps#483) Remove apklib publishing (googlemaps#563) ... # Conflicts: # library/src/androidTest/java/com/google/maps/android/PolyUtilTest.java
Hi @barbeau ! This issue occurred again on one of our user using Galaxy S10e (7.1.2) even though we are using the latest version. I think the log is almost similar to the previous one I posted. See:
|
@Greeeeyyyss Thanks for the update, I'm re-opening. @arriolac Do you have any insight on this issue? See my notes in #532 (comment) - Android docs say we shouldn't have to provide a default drawable resource if My next steps for fixing would be to add a copy of the PNGs drawables in the default resource folder, although I was trying to avoid this if possible given it will increase the size of the library. So any other ideas are welcome! |
@barbeau the solution you proposed would be how I'd fix this as well although you are correct that the system should be able to find the resource even w/o providing a default drawable resource by using either the @Greeeeyyyss is the app distributed as an |
@arriolac yes we are using Android App Bundle when publishing our app |
This should avoid Resources$NotFoundException, possibly due to app being distributed as an Android App Bundle. Fixes #532
This should avoid Resources$NotFoundException, possibly due to app being distributed as an Android App Bundle. Fixes #532
🎉 This issue has been resolved in version 1.3.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Want to confirm something here. For the reported issue, is the app installed by Google Play? You mentioned you are publishing using AAB Want to make sure it is not the case. And, yes. Default resource for drawable is not required. And this is common for Android TV applications. (only providing images in 2 dpi levels) |
I'm seeing some issues with publishing the .aar for this version. Will update here once it's live. |
Changes introduced in PR #731 is live on version 1.3.3 on Maven. |
@seventhmoon this issue happened on production and we are only distributing it in Google Play. @barbeau @arriolac I have pointed our app's map library version to 1.3.3. Thank you for the fix! |
Found this today in a Pixel 3A (Android 11 API 30) using
First time ever happened, same use case as the author. |
Got this exception today in firebase on a Galaxy S21 Ultra 5G. Using following dependencies:
Stack: Fatal Exception: android.content.res.Resources$NotFoundException: Resource ID #0x7f07005c |
Thanks for the report @gpouzerate, re-opening. Given the above crash happened on a Galaxy S21 Ultra 5G, which should be an xxxhdpi display, we could try the same approach as PR #731 and copy the icons into the @arriolac Any thoughts or wisdom on this? It looks like the App Bundles page has changed since your comment in #532 (comment), and the "Known Issues" section is now "Other considerations": ...and it looks like partial installs of sideloaded apps using AABs should now fail on Android 10 and higher, which would include the Galaxy S21 Ultra 5G. So a side-loaded app shouldn't be the cause of this exception. |
@barbeau can't think of another workaround for this—the approach to create a |
👍 PR at #856 |
🎉 This issue has been resolved in version 2.2.3 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Hello, I also encountered this exception when trying to setting up cluster manager. I was running the app on emulator Pixel 4 API 31. After that, I tried to remove all the part of the clustering stuff and only animate the camera to a random location, but this still happened although I did not touch anything regarding cluster manager
|
Hey man, I found the solution in this video. Thanks to the youtuber :) |
Worked for me |
Please reopen this issue, because I still keep getting this error (the |
Hello, I can see the same issue in map utils version
|
Issue still happening in Compose, Last version 2.11.4
|
Same here in library version 3.4.0, the device is Vivo V21 5G(Android 13)
|
Also experiencing this on v3.4.0. According to my stats, I am seeing it on Android 10 - 13, with 67% of the crashes being on Xiaomi devices. The rest are Samsung, Huawei and Oppo. The biggest number of crashes is coming from the Redmi Note 8 Pro. Fatal Exception: android.content.res.Resources$NotFoundException: Resource ID #0x7f0800b1 |
This issue is not a result of a bug in the map SDK but rather stems from users sideloading your APK. There are a few ways to check whether users have sideloaded your app and guide them to reinstall it from official app stores. You can find more information on this topic here. |
I am encountering this error when i try to draw a polyline route in google maps activity android.content.res.Resources$NotFoundException: Resource ID #0x7f0702e9 type #0x4 is not valid |
Summary:
The map randomly crashes while setting up the cluster manager and rendering the clusters.
Steps to reproduce:
This is happening intermittently so it is hard to reproduce. See logs for more details.
Crashlytics Logs
Fatal Exception: android.content.res.Resources$NotFoundException: Resource ID #0x7f08005e at android.content.res.ResourcesImpl.getValueForDensity + 240(ResourcesImpl.java:240) at android.content.res.Resources.getDrawableForDensity + 885(Resources.java:885) at android.content.res.Resources.getDrawable + 828(Resources.java:828) at android.content.res.Resources.getDrawable + 803(Resources.java:803) at com.google.maps.android.ui.BubbleDrawable.(BubbleDrawable.java:3) at com.google.maps.android.ui.IconGenerator.(IconGenerator.java:3) at com.google.maps.android.clustering.view.DefaultClusterRenderer.(DefaultClusterRenderer.java:12) at com.google.maps.android.clustering.ClusterManager.(ClusterManager.java:9) at com.google.maps.android.clustering.ClusterManager.(ClusterManager.java:9) at com.ojoelectric.ojo.ui.map.ScooterMapFragment.onMapReady + 179(ScooterMapFragment.java:179) at com.google.android.gms.maps.zzak.zza(zzak.java:1) at com.google.android.gms.maps.internal.zzaq.dispatchTransaction(zzaq.java:1) at com.google.android.gms.internal.maps.zzb.onTransact + 22(zzb.java:22) at android.os.Binder.transact + 656(Binder.java:656) at hq.b + 14(hq.java:14) at com.google.android.gms.maps.internal.be.a + 4(be.java:4) at com.google.maps.api.android.lib6.impl.bj.run + 4(bj.java:4) at android.os.Handler.handleCallback + 790(Handler.java:790) at android.os.Handler.dispatchMessage + 99(Handler.java:99) at android.os.Looper.loop + 175(Looper.java:175) at android.app.ActivityThread.main + 6724(ActivityThread.java:6724) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run + 438(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main + 810(ZygoteInit.java:810)
Device and Android version:
LG Premiere Pro and LG Stylo 4 (8.1.0)
Galaxy J7 Crown (8.0) and Galaxy S8+ (7.1.2) and Galaxy Tab E 8.0 (7.1.1)
ZTE ZFive C LTE (7.1.1) and Z999 (7.1.2)
OnePlus 5T and OnePlus 6 (9.0)
Pixel XL (9.0)
AlcatelOneTouch (7.0)
XiaoMi 5 (8.0)
Coolpad Legacy (9.0)
I am using the following google map dependencies:
The text was updated successfully, but these errors were encountered: