Skip to content
This repository has been archived by the owner on Mar 28, 2018. It is now read-only.

Crash: android.content.res.Resources$NotFoundException #18

Open
markharding opened this issue Jun 18, 2015 · 5 comments
Open

Crash: android.content.res.Resources$NotFoundException #18

markharding opened this issue Jun 18, 2015 · 5 comments
Labels

Comments

@markharding
Copy link
Member

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)
@rubenstolk
Copy link

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!

@thomasMary
Copy link

I'm facing the same crash, have you found a solution?

@hauzarni
Copy link

hauzarni commented Aug 25, 2016

same problem only at startup when i change the orientation while loading the app.
Resources$NotFoundException
splashImageView.setImageDrawable(cordova.getActivity().getResources().getDrawable(drawableId));

@johnottman
Copy link

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 notifications@github.com 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
#18 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AB_PgqNO4BZanXnOcR1hnNBWVM-_UJ_eks5qjYnsgaJpZM4FGOQL
.

@hauzarni
Copy link

hauzarni commented Aug 26, 2016

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>

markharding pushed a commit that referenced this issue Mar 27, 2017
* (fix): Refresh points counter when re-logging and add pull to refresh on wallet view (#19)

* (feat): Re-sync discovery entity when loading full-screen (#17)

* (feat): Be able to click post date to original post page (#16)

* (fix): ios icon

* (fix): Boost rejected notification typo (#21)

* (fix) : Reminds don't take you to the original post (#23)

* (fix): Link images and blogs on notifications (#20)

* (fix): Wrong storage key for points animation toggle (#22)

* (feat): Improve back button visibility (z-index and outline) (#18)

* (fix): prevent navigation become dead when pop is happening

* (chore): improve unread and online icons

* (feat): Implement comment attachments and rich embeds

* (feat): Allow setting explicit comments and show them blurred
markharding pushed a commit that referenced this issue Mar 27, 2017
…nimation when on background (#28)

* (fix): Refresh points counter when re-logging and add pull to refresh on wallet view (#19)

* (feat): Re-sync discovery entity when loading full-screen (#17)

* (feat): Be able to click post date to original post page (#16)

* (fix): ios icon

* (fix): Boost rejected notification typo (#21)

* (fix) : Reminds don't take you to the original post (#23)

* (fix): Link images and blogs on notifications (#20)

* (fix): Wrong storage key for points animation toggle (#22)

* (feat): Improve back button visibility (z-index and outline) (#18)

* (fix): prevent navigation become dead when pop is happening

* (chore): improve unread and online icons

* (feat): Create App Status service and disable points animation when on background
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants