Closed Greeeeyyyss closed 3 years ago
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: Nexus 6 (Android 7.1) OnePlus GM1910 (Android 9)
It also occurs in these devices.
Nexus 4 (Android 8.10) Moto E4 (Android 7.1.1)
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 BubbleDrawable
, the shadow and mask PNG resources are only defined in the drawable-xhdpi
and drawable-xxhdpi
folders:
https://github.com/googlemaps/android-maps-utils/tree/master/library/src/main/res
The Android resources docs say:
Caution: When defining an alternative resource, make sure you also define the resource in a default configuration. Otherwise, your app might encounter runtime exceptions when the device changes a configuration. For example, if you add a string to only values-en and not values, your app might encounter a Resource Not Found exception when the user changes the default system language.
I'm guessing in some cases Android is trying to load the resources at densities other than xhdpi
or xxhdpi
, and as a result there isn't a default resource to load, and therefore it throws the Resources$NotFoundException
.
A counter argument to this theory is that further down the docs also say:
There is one exception to this rule: If your app's minSdkVersion is 4 or greater, you don't need default drawable resources when you provide alternative drawable resources with the screen density qualifier. Even without default drawable resources, Android can find the best match among the alternative screen densities and scale the bitmaps as necessary. However, for the best experience on all types of devices, you should provide alternative drawables for all three types of density.
A potential complicating factor is that Drawable getDrawable (int id)
was deprecated in API level 22, with getDrawable(int, Theme)
replacing it. There is also ContextCompat.getDrawable()
in the Android X library.
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 ContextCompat.getDrawable()
.
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.
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:
Fatal Exception: android.content.res.Resources$NotFoundException: Resource ID #0x7f080060 at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:190) at android.content.res.Resources.getDrawable(Resources.java:770) at android.content.Context.getDrawable(Context.java:525) at androidx.core.content.ContextCompat.getDrawable(ContextCompat.java:455) at com.google.maps.android.ui.BubbleDrawable.<init>(BubbleDrawable.java:43) at com.google.maps.android.ui.IconGenerator.<init>(IconGenerator.java:60) at com.google.maps.android.clustering.view.DefaultClusterRenderer.<init>(DefaultClusterRenderer.java:132) at com.google.maps.android.clustering.ClusterManager.<init>(ClusterManager.java:76) at com.google.maps.android.clustering.ClusterManager.<init>(ClusterManager.java:68) at com.ojoelectric.ojo.ui.map.ScooterMapFragment.onMapReady(ScooterMapFragment.java:199) at com.google.android.gms.maps.zzak.zza(zzak.java:2) at com.google.android.gms.maps.internal.zzaq.dispatchTransaction(zzaq.java:12) at com.google.android.gms.internal.maps.zzb.onTransact(zzb.java:12) at android.os.Binder.transact(Binder.java:499) at ck.b(ck.java:2) at com.google.maps.api.android.lib6.impl.be.run(be.java:2) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6131) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:892) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:782)
@Greeeeyyyss Thanks for the update, I'm re-opening.
@arriolac Do you have any insight on this issue? See my notes in https://github.com/googlemaps/android-maps-utils/issues/532#issuecomment-548398116 - Android docs say we shouldn't have to provide a default drawable resource if minSdkVersion
is 4 or greater, but it seems that without one (and even with the latest compat libraries) we're getting a Resources$NotFoundException
in some cases.
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 xhdpi
or xxhdpi
asset and scaling it to match the device's density.
@Greeeeyyyss is the app distributed as an aab
? Looks like there are some cases where this exception might be thrown as outlined in the Android App Bundle docs Known issues.
@arriolac yes we are using Android App Bundle when publishing our app
:tada: This issue has been resolved in version 1.3.2 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
Want to confirm something here. For the reported issue, is the app installed by Google Play?
You mentioned you are publishing using AAB There are some website providing APK files, those provided APK files are extracted from devices and may not fit the installing machine, result as ResourceNotFoundException.
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 play_services_maps 17.0.0
and android_maps_utils 2.1.0
:
android.content.res.Resources$NotFoundException: Resource ID #0x7f060016 type #0x3 is not valid
at android.content.res.Resources.getDimensionPixelSize(Resources.java:827)
at com.google.maps.api.android.lib6.impl.av.n(:com.google.android.gms.dynamite_mapsdynamite@204215097@20.42.15 (150400-0):5)
at com.google.maps.api.android.lib6.impl.fd.<init>(:com.google.android.gms.dynamite_mapsdynamite@204215097@20.42.15 (150400-0):6)
at com.google.maps.api.android.lib6.impl.bm.ay(:com.google.android.gms.dynamite_mapsdynamite@204215097@20.42.15 (150400-0):14)
at com.google.maps.api.android.lib6.impl.cx.c(:com.google.android.gms.dynamite_mapsdynamite@204215097@20.42.15 (150400-0):2)
at com.google.android.gms.maps.internal.q.aW(:com.google.android.gms.dynamite_mapsdynamite@204215097@20.42.15 (150400-0):15)
at dn.onTransact(:com.google.android.gms.dynamite_mapsdynamite@204215097@20.42.15 (150400-0):4)
at android.os.Binder.transact(Binder.java:1043)
at com.google.android.gms.internal.maps.zza.zzb(Unknown Source:20)
at com.google.android.gms.maps.internal.zzk.onCreate(Unknown Source:17)
at com.google.android.gms.maps.MapView$zza.onCreate(Unknown Source:8)
at com.google.android.gms.dynamic.zad.zaa(com.google.android.gms:play-services-base@@17.3.0:3)
at com.google.android.gms.dynamic.zab.onDelegateCreated(com.google.android.gms:play-services-base@@17.3.0:4)
at com.google.android.gms.maps.MapView$zzb.createDelegate(Unknown Source:16)
at com.google.android.gms.dynamic.DeferredLifecycleHelper.zaa(com.google.android.gms:play-services-base@@17.3.0:18)
at com.google.android.gms.dynamic.DeferredLifecycleHelper.onCreate(com.google.android.gms:play-services-base@@17.3.0:22)
at com.google.android.gms.maps.MapView.onCreate(Unknown Source:26)
First time ever happened, same use case as the author. Build > Clean Project fixed the issue (so far).
Got this exception today in firebase on a Galaxy S21 Ultra 5G. App distributed on Google Play with an app bundle.
Using following dependencies:
Stack:
Fatal Exception: android.content.res.Resources$NotFoundException: Resource ID #0x7f07005c
at android.content.res.ResourcesImpl.getValueForDensity(ResourcesImpl.java:290)
at android.content.res.Resources.getDrawableForDensity(Resources.java:1045)
at android.content.res.Resources.getDrawable(Resources.java:985)
at android.content.Context.getDrawable(Context.java:697)
at androidx.core.content.ContextCompat.getDrawable(ContextCompat.java:455)
at com.google.maps.android.ui.BubbleDrawable.
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 https://github.com/googlemaps/android-maps-utils/pull/731 and copy the icons into the drawable-xxxhdpi
folder as well.
@arriolac Any thoughts or wisdom on this?
It looks like the App Bundles page has changed since your comment in https://github.com/googlemaps/android-maps-utils/issues/532#issuecomment-631594308, and the "Known Issues" section is now "Other considerations": https://developer.android.com/guide/app-bundle/#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 drawable-xxxhdpi
makes sense to me.
:tada: This issue has been resolved in version 2.2.3 :tada:
The release is available on:
v2.2.3
Your semantic-release bot :package::rocket:
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
android.content.res.Resources$NotFoundException: Resource ID #0x7f070016 type #0x3 is not valid
at android.content.res.Resources.getDimensionPixelSize(Resources.java:827)
at com.google.maps.api.android.lib6.impl.ax.d(:com.google.android.gms.dynamite_mapsdynamite@214218120@21.42.18 (190800-0):5)
at com.google.maps.api.android.lib6.impl.fh.<init>(:com.google.android.gms.dynamite_mapsdynamite@214218120@21.42.18 (190800-0):6)
at com.google.maps.api.android.lib6.impl.bo.az(:com.google.android.gms.dynamite_mapsdynamite@214218120@21.42.18 (190800-0):16)
at com.google.maps.api.android.lib6.impl.cr.o(:com.google.android.gms.dynamite_mapsdynamite@214218120@21.42.18 (190800-0):2)
at com.google.android.gms.maps.internal.o.aX(:com.google.android.gms.dynamite_mapsdynamite@214218120@21.42.18 (190800-0):19)
at dx.onTransact(:com.google.android.gms.dynamite_mapsdynamite@214218120@21.42.18 (190800-0):4)
at android.os.Binder.transact(Binder.java:1064)
at com.google.android.gms.internal.maps.zza.zzH(com.google.android.gms:play-services-maps@@18.0.0:2)
at com.google.android.gms.maps.internal.zzk.onCreateView(com.google.android.gms:play-services-maps@@18.0.0:5)
at com.google.android.gms.maps.zzau.onCreateView(com.google.android.gms:play-services-maps@@18.0.0:7)
at com.google.android.gms.dynamic.zad.zab(com.google.android.gms:play-services-base@@18.0.1:2)
at com.google.android.gms.dynamic.DeferredLifecycleHelper.zaf(com.google.android.gms:play-services-base@@18.0.1:1)
at com.google.android.gms.dynamic.DeferredLifecycleHelper.onCreateView(com.google.android.gms:play-services-base@@18.0.1:2)
at com.google.android.gms.maps.SupportMapFragment.onCreateView(com.google.android.gms:play-services-maps@@18.0.0:1)
at androidx.fragment.app.Fragment.performCreateView(Fragment.java:2963)
at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:518)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:282)
at androidx.fragment.app.FragmentStore.moveToExpectedState(FragmentStore.java:112)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1647)
at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:3128)
at androidx.fragment.app.FragmentManager.dispatchActivityCreated(FragmentManager.java:3072)
at androidx.fragment.app.FragmentController.dispatchActivityCreated(FragmentController.java:251)
at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:502)
at androidx.appcompat.app.AppCompatActivity.onStart(AppCompatActivity.java:246)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1455)
at android.app.Activity.performStart(Activity.java:8076)
at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3660)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2210)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7839)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
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
android.content.res.Resources$NotFoundException: Resource ID #0x7f070016 type #0x3 is not valid at android.content.res.Resources.getDimensionPixelSize(Resources.java:827) at com.google.maps.api.android.lib6.impl.ax.d(:com.google.android.gms.dynamite_mapsdynamite@214218120@21.42.18 (190800-0):5) at com.google.maps.api.android.lib6.impl.fh.<init>(:com.google.android.gms.dynamite_mapsdynamite@214218120@21.42.18 (190800-0):6) at com.google.maps.api.android.lib6.impl.bo.az(:com.google.android.gms.dynamite_mapsdynamite@214218120@21.42.18 (190800-0):16) at com.google.maps.api.android.lib6.impl.cr.o(:com.google.android.gms.dynamite_mapsdynamite@214218120@21.42.18 (190800-0):2) at com.google.android.gms.maps.internal.o.aX(:com.google.android.gms.dynamite_mapsdynamite@214218120@21.42.18 (190800-0):19) at dx.onTransact(:com.google.android.gms.dynamite_mapsdynamite@214218120@21.42.18 (190800-0):4) at android.os.Binder.transact(Binder.java:1064) at com.google.android.gms.internal.maps.zza.zzH(com.google.android.gms:play-services-maps@@18.0.0:2) at com.google.android.gms.maps.internal.zzk.onCreateView(com.google.android.gms:play-services-maps@@18.0.0:5) at com.google.android.gms.maps.zzau.onCreateView(com.google.android.gms:play-services-maps@@18.0.0:7) at com.google.android.gms.dynamic.zad.zab(com.google.android.gms:play-services-base@@18.0.1:2) at com.google.android.gms.dynamic.DeferredLifecycleHelper.zaf(com.google.android.gms:play-services-base@@18.0.1:1) at com.google.android.gms.dynamic.DeferredLifecycleHelper.onCreateView(com.google.android.gms:play-services-base@@18.0.1:2) at com.google.android.gms.maps.SupportMapFragment.onCreateView(com.google.android.gms:play-services-maps@@18.0.0:1) at androidx.fragment.app.Fragment.performCreateView(Fragment.java:2963) at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:518) at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:282) at androidx.fragment.app.FragmentStore.moveToExpectedState(FragmentStore.java:112) at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1647) at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:3128) at androidx.fragment.app.FragmentManager.dispatchActivityCreated(FragmentManager.java:3072) at androidx.fragment.app.FragmentController.dispatchActivityCreated(FragmentController.java:251) at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:502) at androidx.appcompat.app.AppCompatActivity.onStart(AppCompatActivity.java:246) at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1455) at android.app.Activity.performStart(Activity.java:8076) at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3660) at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221) at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201) at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2210) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7839) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
Hey man, I found the solution in this video. Thanks to the youtuber :) https://www.youtube.com/watch?v=1WBMnhrimKM&t=132s&ab_channel=CodingTony
Found this today in a Pixel 3A (Android 11 API 30) using
play_services_maps 17.0.0
andandroid_maps_utils 2.1.0
:android.content.res.Resources$NotFoundException: Resource ID #0x7f060016 type #0x3 is not valid at android.content.res.Resources.getDimensionPixelSize(Resources.java:827) at com.google.maps.api.android.lib6.impl.av.n(:com.google.android.gms.dynamite_mapsdynamite@204215097@20.42.15 (150400-0):5) at com.google.maps.api.android.lib6.impl.fd.<init>(:com.google.android.gms.dynamite_mapsdynamite@204215097@20.42.15 (150400-0):6) at com.google.maps.api.android.lib6.impl.bm.ay(:com.google.android.gms.dynamite_mapsdynamite@204215097@20.42.15 (150400-0):14) at com.google.maps.api.android.lib6.impl.cx.c(:com.google.android.gms.dynamite_mapsdynamite@204215097@20.42.15 (150400-0):2) at com.google.android.gms.maps.internal.q.aW(:com.google.android.gms.dynamite_mapsdynamite@204215097@20.42.15 (150400-0):15) at dn.onTransact(:com.google.android.gms.dynamite_mapsdynamite@204215097@20.42.15 (150400-0):4) at android.os.Binder.transact(Binder.java:1043) at com.google.android.gms.internal.maps.zza.zzb(Unknown Source:20) at com.google.android.gms.maps.internal.zzk.onCreate(Unknown Source:17) at com.google.android.gms.maps.MapView$zza.onCreate(Unknown Source:8) at com.google.android.gms.dynamic.zad.zaa(com.google.android.gms:play-services-base@@17.3.0:3) at com.google.android.gms.dynamic.zab.onDelegateCreated(com.google.android.gms:play-services-base@@17.3.0:4) at com.google.android.gms.maps.MapView$zzb.createDelegate(Unknown Source:16) at com.google.android.gms.dynamic.DeferredLifecycleHelper.zaa(com.google.android.gms:play-services-base@@17.3.0:18) at com.google.android.gms.dynamic.DeferredLifecycleHelper.onCreate(com.google.android.gms:play-services-base@@17.3.0:22) at com.google.android.gms.maps.MapView.onCreate(Unknown Source:26)
First time ever happened, same use case as the author. Build > Clean Project fixed the issue (so far).
Worked for me
Please reopen this issue, because I still keep getting this error (the Resource ID #0x7f060016 type #0x3 is not valid
version). I'm using Compose, so I commented on googlemaps/android-maps-compose#222 first. I'm not using clustering.
Hello, I can see the same issue in map utils version 2.4.0
Fatal Exception: android.content.res.Resources$NotFoundException: Resource ID #0x7f080096
at android.content.res.ResourcesImpl.getValueForDensity(ResourcesImpl.java:249)
at android.content.res.Resources.getDrawableForDensity(Resources.java:1047)
at android.content.res.Resources.getDrawable(Resources.java:987)
at android.content.Context.getDrawable(Context.java:758)
at androidx.core.content.ContextCompat$Api21Impl.getDrawable(ContextCompat.java:1012)
at androidx.core.content.ContextCompat.getDrawable(ContextCompat.java:522)
at com.google.maps.android.ui.BubbleDrawable.<init>(BubbleDrawable.java:43)
at com.google.maps.android.ui.IconGenerator.<init>(IconGenerator.java:60)
at com.google.maps.android.clustering.view.DefaultClusterRenderer.<init>(DefaultClusterRenderer.java:140)
at com.google.maps.android.clustering.ClusterManager.<init>(ClusterManager.java:78)
at com.google.maps.android.clustering.ClusterManager.<init>(ClusterManager.java:70)
Issue still happening in Compose,
Last version 2.11.4
FATAL EXCEPTION: main Process: com.selsela.food, PID: 2140 android.content.res.Resources$NotFoundException: Resource ID #0x7f070016 type #0x3 is not valid at android.content.res.Resources.getDimensionPixelSize(Resources.java:875) at com.google.maps.api.android.lib6.impl.ay.d(:com.google.android.gms.dynamite_mapsdynamite@231613044@23.16.13 (190400-0):5) at com.google.maps.api.android.lib6.impl.fc.<init>(:com.google.android.gms.dynamite_mapsdynamite@231613044@23.16.13 (190400-0):6) at com.google.maps.api.android.lib6.impl.bk.aD(:com.google.android.gms.dynamite_mapsdynamite@231613044@23.16.13 (190400-0):15) at com.google.maps.api.android.lib6.impl.cu.d(:com.google.android.gms.dynamite_mapsdynamite@231613044@23.16.13 (190400-0):2) at com.google.android.gms.maps.internal.q.bb(:com.google.android.gms.dynamite_mapsdynamite@231613044@23.16.13 (190400-0):21) at ff.onTransact(:com.google.android.gms.dynamite_mapsdynamite@231613044@23.16.13 (190400-0):4) at android.os.Binder.transact(Binder.java:1169) at com.google.android.gms.internal.maps.zza.zzc(com.google.android.gms:play-services-maps@@18.1.0:2) at com.google.android.gms.maps.internal.zzl.onCreate(com.google.android.gms:play-services-maps@@18.1.0:3) at com.google.android.gms.maps.zzag.onCreate(com.google.android.gms:play-services-maps@@18.1.0:3) at com.google.android.gms.dynamic.zac.zab(com.google.android.gms:play-services-base@@18.1.0:1) at com.google.android.gms.dynamic.zaa.onDelegateCreated(com.google.android.gms:play-services-base@@18.1.0:3) at com.google.android.gms.maps.zzah.zzb(com.google.android.gms:play-services-maps@@18.1.0:5) at com.google.android.gms.maps.zzah.createDelegate(com.google.android.gms:play-services-maps@@18.1.0:1) at com.google.android.gms.dynamic.DeferredLifecycleHelper.zaf(com.google.android.gms:play-services-base@@18.1.0:6) at com.google.android.gms.dynamic.DeferredLifecycleHelper.onCreate(com.google.android.gms:play-services-base@@18.1.0:1) at com.google.android.gms.maps.MapView.onCreate(com.google.android.gms:play-services-maps@@18.1.0:4) at com.google.maps.android.compose.GoogleMapKt.lifecycleObserver$lambda$11(GoogleMap.kt:204) at com.google.maps.android.compose.GoogleMapKt.$r8$lambda$Vm6abttjyrD0BNPAw0a-nOgtk1E(Unknown Source:0) at com.google.maps.android.compose.GoogleMapKt$$ExternalSyntheticLambda0.onStateChanged(Unknown Source:4) at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.kt:314) at androidx.lifecycle.LifecycleRegistry.addObserver(LifecycleRegistry.kt:192) at com.google.maps.android.compose.GoogleMapKt$MapLifecycle$1.invoke(GoogleMap.kt:179) at com.google.maps.android.compose.GoogleMapKt$MapLifecycle$1.invoke(GoogleMap.kt:175) at androidx.compose.runtime.DisposableEffectImpl.onRemembered(Effects.kt:82) at androidx.compose.runtime.CompositionImpl$RememberEventDispatcher.dispatchRememberObservers(Composition.kt:1137) at androidx.compose.runtime.CompositionImpl.applyChangesInLocked(Composition.kt:828) at androidx.compose.runtime.CompositionImpl.applyChanges(Composition.kt:849) at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$1.invoke(Recomposer.kt:622) at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$1.invoke(Recomposer.kt:536) at androidx.compose.ui.platform.AndroidUiFrameClock$withFrameNanos$2$callback$1.doFrame(AndroidUiFrameClock.android.kt:41) at androidx.compose.ui.platform.AndroidUiDispatcher.performFrameDispatch(AndroidUiDispatcher.android.kt:109) at androidx.compose.ui.platform.AndroidUiDispatcher.access$performFrameDispatch(AndroidUiDispatcher.android.kt:41) at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(AndroidUiDispatcher.android.kt:69) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1449) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1459) at android.view.Choreographer.doCallbacks(Choreographer.java:1089) 2140-2140 AndroidRuntime com.selsela.food E at android.view.Choreographer.doFrame(Choreographer.java:998) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1431) at android.os.Handler.handleCallback(Handler.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:211) at android.os.Looper.loop(Looper.java:300) at android.app.ActivityThread.main(ActivityThread.java:8296) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:559) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:954) Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [androidx.compose.runtime.PausableMonotonicFrameClock@6504c20, androidx.compose.ui.platform.MotionDurationScaleImpl@82259d9, StandaloneCoroutine{Cancelling}@4d68f9e, AndroidUiDispatcher@1517a7f]
Same here in library version 3.4.0, the device is Vivo V21 5G(Android 13)
Fatal Exception: android.content.res.Resources$NotFoundException: Resource ID #0x7f070055 at android.content.res.ResourcesImpl.getValueForDensity(ResourcesImpl.java:353) at android.content.res.Resources.getDrawableForDensity(Resources.java:1078) at android.content.res.Resources.getDrawable(Resources.java:1018) at android.content.Context.getDrawable(Context.java:810) at androidx.core.content.ContextCompat$Api21Impl.getDrawable(ContextCompat.java:864) at androidx.core.content.ContextCompat.getDrawable(ContextCompat.java:483) at com.google.maps.android.ui.BubbleDrawable.<init>(BubbleDrawable.java:42) at com.google.maps.android.ui.IconGenerator.<init>(IconGenerator.java:60) at com.google.maps.android.clustering.view.DefaultClusterRenderer.<init>(DefaultClusterRenderer.java:141) at com.google.maps.android.clustering.ClusterManager.<init>(ClusterManager.java:80) at com.google.maps.android.clustering.ClusterManager.<init>(ClusterManager.java:72) at pl.dominium.base.util.map.presenter.base.ClusterMapPresenter.onMapReady(ClusterMapPresenter.kt:37) at com.google.android.gms.maps.zzaf.zzb(com.google.android.gms:play-services-maps@@18.1.0:1) at com.google.android.gms.maps.internal.zzar.zza(com.google.android.gms:play-services-maps@@18.1.0:6) at com.google.android.gms.internal.maps.zzb.onTransact(com.google.android.gms:play-services-maps@@18.1.0:3) at android.os.Binder.transact(Binder.java:1184) at fe.c(:com.google.android.gms.dynamite_mapsdynamite@232216044@23.22.16 (190400-0):2) at com.google.maps.api.android.lib6.impl.bg.run(:com.google.android.gms.dynamite_mapsdynamite@232216044@23.22.16 (190400-0):2) at android.os.Handler.handleCallback(Handler.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:223) at android.os.Looper.loop(Looper.java:324) at android.app.ActivityThread.main(ActivityThread.java:8486) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:582) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1061)
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
at android.content.res.ResourcesImpl.getValueForDensity(ResourcesImpl.java:251)
at android.content.res.Resources.getDrawableForDensity(Resources.java:1050)
at android.content.res.Resources.getDrawable(Resources.java:990)
at android.content.Context.getDrawable(Context.java:814)
at androidx.core.content.ContextCompat$Api21Impl.getDrawable(ContextCompat.java)
at androidx.core.content.ContextCompat.getDrawable(ContextCompat.java)
at com.google.maps.android.ui.BubbleDrawable.
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
at android.content.res.Resources.getDimensionPixelSize(Resources.java:836)
at com.google.maps.api.android.lib6.impl.be.d(:com.google.android.gms.policy_maps_core_dynamite@234910201@234910200049.587833741.587833741:41)
at com.google.maps.api.android.lib6.impl.ab.
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: