Skip to main content

React-Native Android Application not building after using generator-rn-toolbox?

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:, PID: 10806
    java.lang.RuntimeException: Unable to start activity ComponentInfo{}: android.content.res.Resources$NotFoundException: Drawable with resource ID #0x7f060057

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. 


Popular posts from this blog

Adding a space to your iOS App Name

How to add a space to your display name There is a cap of sorts for iOS applications where once your display name exceeds 12 characters, it will strip any spaces in it. There are a lot of posts on StackOverflow about this, however the missed one small detail on how to edit the value. What we need to do is edit info.plist. You can try this in Xcode but it doesn't work, you need to use another text editor - in my case I used Visual Studio Code. Your directory structure may vary, here I am working on a React Native project. Instead of iOS, your root folder may be your project name.  Go to: build > * Your application name * > edit info.plist The value we want to update is " CFBundleDisplayName ".  Where the space(s) are, we need to replace the space here with:      Your CFBundleDisplayName should then look like this: That is all there is to it! Hope this helps you out.

How to enable the lock screen for your Android Emulator

Here's how: When I was testing and app with media controls, I would press the lock button, once to lock the screen and a second to unlock it which would instantly unlock it and take you to the app.  By setting the option for ‘swipe’ when unlocking the screen (pressing the power button the second time) you are now presented with the lock screen and can swipe/drag the screen upwards to go the application Go to Settings --> Security --> Screen Lock Choose 'Swipe' That's all there is to it!

Xcode - ld: library not found for -lDoubleConversion

Here's how you fix this issue Ran into this with the iOS version of my React Native application, the fix is very quick and easy: We need to disable dead code stripping for our release, this is how to do it: Open XCode and press: Cmd + 1 Click on your project in the left panel Click on "Build Settings" In the "Linking" section, under the "Dead Code Stripping" section, change the setting for "Release" from "Yes" to "No"