Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android 12 - Fatal Exception: android.content.res.Resources$NotFoundException

I'm getting the below error on Android 12 devices.

Fatal Exception: android.content.res.Resources$NotFoundException: Resource ID #0x20c0025
   at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:240)
   at android.content.res.Resources.getInteger(Resources.java:1275)
   at org.chromium.ui.base.DeviceFormFactor.isTablet(DeviceFormFactor.java:8)
   at cs.a(cs.java:4)
   at org.chromium.content.browser.BrowserStartupControllerImpl.e(BrowserStartupControllerImpl.java:25)
   at org.chromium.content.browser.BrowserStartupControllerImpl.g(BrowserStartupControllerImpl.java:26)
   at E8.run(E8.java:127)
   at org.chromium.base.ThreadUtils.f(ThreadUtils.java:6)
   at EB0.g(EB0.java:209)
   at DB0.run(DB0.java:7)
   at android.os.Handler.handleCallback(Handler.java:938)
   at android.os.Handler.dispatchMessage(Handler.java:99)
   at android.os.Looper.loopOnce(Looper.java:226)
   at android.os.Looper.loop(Looper.java:313)
   at android.app.ActivityThread.main(ActivityThread.java:8582)
   at java.lang.reflect.Method.invoke(Method.java)
   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:563)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1133)

Any help is highly appreciated. Thanks in Advance.

like image 729
Ashu Tyagi Avatar asked Dec 01 '21 08:12

Ashu Tyagi


People also ask

What is the resource id for notfoundexception in Android?

It is obvious that the resource ID is # 0x7f08010a android.content.res.Resources$NotFoundException: Resource ID #0x7f08010a Next, we went to the resource file and found that it was et_ search_ The cursor control ID, we will find the specific layout, and then look at its call.

Why am I getting resource not found in my App?

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.

Why am I getting resourcenotfoundexception when publishing using AaB?

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.


1 Answers

This is an upstream bug on Android 12 + Samsung devices, Chromium team and Samsung are aware. Star this issue to follow along:

https://bugs.chromium.org/p/chromium/issues/detail?id=1271617

Until then, add platform-specific / vendor-specific disable of WebView usage or your app will crash out-of-process (in the WebView) and it can't be handled unfortunately.

Related https://github.com/react-native-device-info/react-native-device-info/issues/1351

like image 120
Mike Hardy Avatar answered Oct 24 '22 06:10

Mike Hardy