React-native-splash-screen plugin Android App crash issue

Source: Internet
Author: User

Problem

React-native version 0.53.3

React-native-splash-screen version 3.0.6

When everything is properly configured, the following issues occur:

Debug Error in Android Studio isandroid.content.res.Resources$NotFoundException: Resource ID #0x7f040038 type {这里是#什么的} is not valid

Reason

React-native-splash-screen versions 3.0.1 and 3.0.6 differ

The differences are as follows, the following is 3.0.6 Version:

The newly referenced color can be seen by these two files. primary_dark

Refs.xml

Styles.xml

Solve

The problem occurs when a new version of the referenced color is not found, so the workaround is as follows:

Create a new file in the project android/app/src/main/res/values/ directory colors.xml and add the value that the new version references to primary_dark :

<?xml version="1.0" encoding="utf-8"?><resources>    <color name="primary_dark">#000000</color></resources>

Re react-native run-android -fix it.

React-native-splash-screen plugin Android App crash issue

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.