skip to Main Content

I installed the Bootsplash library and it works fine on iOS. But when I want to run it on Android, I get the following error;
ERROR:quiz_app/android/app/build/intermediates/incremental/debug/mergeDebugResources/merged.dir/values/values.xml:5506: AAPT: error: resource color/bootsplash_background (aka com.quiz_app:color/bootsplash_background) not found.

My assets folder includes SplashScreenLogo.png

MainActivity.java

enter image description here
MainActivity.java
styles.xml

react-native version: 0.72.6
react-native-bootsplash version: 5.0.4

How can I fix this problem ?

Thanks for reading.

I changed the name of my SplashScreenLogo.png file to bootsplash_logo but it didn’t work.
I ran the ./gradlew clean command and compiled the application again but it didn’t work.

2

Answers


  1. This is likely happening because you haven’t created (or modified) the colors.xml file properly. The color bootsplash_background is missing from the file.

    Navigate to android/app/src/main/res/values/colors.xml in your project (or create the file if it doesn’t exist) and add the following content:

    <resources>
        <color name="bootsplash_background">#ffffff</color>
    </resources>
    

    If the file already has some colors defined, just add the bootsplash_background one under any color and rebuild the app.

    Login or Signup to reply.
  2. Yeah, please remove this line
    <item name="bootSplashBrand">@drawable/bootsplash_brand</item> in androidappsrcmainresvaluestyle.xml

    it work 100%.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search