Crash: android.content.res.Resources$NotFoundException
android.content.res.Resources$NotFoundException: Resource ID #0x7f020041
at android.content.res.Resources.getValue(Resources.java:1163)
at android.content.res.Resources.getDrawable(Resources.java:713)
at org.apache.cordova.splashscreen.SplashScreen.onConfigurationChanged(SplashScreen.java:186)
at org.apache.cordova.PluginManager.onConfigurationChanged(PluginManager.java:507)
at org.apache.cordova.CordovaActivity.onConfigurationChanged(CordovaActivity.java:456)
at android.app.ActivityThread.performConfigurationChanged(ActivityThread.java:3879)
at android.app.ActivityThread.handleConfigurationChanged(ActivityThread.java:3960)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1317)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5118)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:606)
at dalvik.system.NativeStart.main(Native Method)
Hi @markharding I've seen the exact crash in one on my cordova-based apps, please keep me in the loop if you find a solution, I'll do the same!
I'm facing the same crash, have you found a solution?
same problem only at startup when i change the orientation while loading the app. Resources$NotFoundException splashImageView.setImageDrawable(cordova.getActivity().getResources().getDrawable(drawableId));
Perhaps the same as iOS crash when orienting a video from portrait to landscape from inline newsfeed position.
On Thu, Aug 25, 2016 at 8:26 AM, wninou [email protected] wrote:
same problem on only at startup when i change the orientation while loading the app.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Minds/mobile/issues/18#issuecomment-242367773, or mute the thread https://github.com/notifications/unsubscribe-auth/AB_PgqNO4BZanXnOcR1hnNBWVM-_UJ_eks5qjYnsgaJpZM4FGOQL .
Ok the solution is simple : an image was missing in my splash screen plugin config...
org.apache.cordova.splashscreen.SplashScreen.onConfigurationChanged(SplashScreen.java:186) generated the error because a density was missing in my config file.
As written in the cordova-plugin-splashscreen documentation we must define each density and insert the relative images...
<platform name="android">
<splash src="res/screen/android/splash-land-hdpi.png" density="land-hdpi"/>
<splash src="res/screen/android/splash-land-ldpi.png" density="land-ldpi"/>
<splash src="res/screen/android/splash-land-mdpi.png" density="land-mdpi"/>
<splash src="res/screen/android/splash-land-xhdpi.png" density="land-xhdpi"/>
<splash src="res/screen/android/splash-port-hdpi.png" density="port-hdpi"/>
<splash src="res/screen/android/splash-port-ldpi.png" density="port-ldpi"/>
<splash src="res/screen/android/splash-port-mdpi.png" density="port-mdpi"/>
<splash src="res/screen/android/splash-port-xhdpi.png" density="port-xhdpi"/>
</platform>