React-native-splash-screen: App can't run up (android)

Created on 14 Dec 2017  Â·  5Comments  Â·  Source: crazycodeboy/react-native-splash-screen

Most helpful comment

Hi! Try this solution:

created file android/app/src/main/res/values/colors.xml
and setting content
<?xml version="1.0" encoding="utf-8"?> <resources> <color name="primary_dark">#660B0B0B</color> </resources>

from https://github.com/crazycodeboy/react-native-splash-screen/issues/127

All 5 comments

Hi! Try this solution:

created file android/app/src/main/res/values/colors.xml
and setting content
<?xml version="1.0" encoding="utf-8"?> <resources> <color name="primary_dark">#660B0B0B</color> </resources>

from https://github.com/crazycodeboy/react-native-splash-screen/issues/127

What does this mean #660B0B0B ? thanks @nmorozov

@nmorozov solution is correct. This library has a reference to a color called primary_dark that needs to exist in your project, even if you don't use it.
Without having it set in your project, the newer support libraries, 24/25 and above cause a crash. Maybe lower versions as well but that is what I have noticed.
Adding in a value for primary_dark in your colors.xml file fixes the issue. The color value can be anything you want.

@basudz365 Thanks. You've solved my problem perfectly.

Unfortunately creating "colors.xml" file with primary_dark color doesn't help me :(

Was this page helpful?
0 / 5 - 0 ratings