Splash screen broke my Android Application
Scratching your head at this?Been there. I've included the debug output below to make it easier for others to find this page if they too run into this issue:
D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.app, PID: 10806
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.app/com.app.MainActivity}: android.content.res.Resources$NotFoundException: Drawable com.app:drawable/launch_screen_bitmap with resource ID #0x7f060057
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2913)
So, what is causing the error we're seeing here?
From what I saw, it was an issue with the background colour value. It wasn't obvious when there was nothing in the project called "launch_screen_bitmap" Instead of the being a six character hex value and instead it was a lot longer than that!
The location for the file you need to edit is in: App > Res > Values > colours.xml
I corrected this by selecting the hex value for the splash screen I was using for the application:
After that, the issue was resolved. Hopefully this helps you out if you to run into the same issue.
Comments
Post a Comment