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
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
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:If the file already has some colors defined, just add the
bootsplash_background
one under any color and rebuild the app.Yeah, please remove this line
<item name="bootSplashBrand">@drawable/bootsplash_brand</item>
inandroidappsrcmainresvaluestyle.xml
it work 100%.