Skip to content

Android App crash on start after upgrading to 0.59.8 #25024

@BasilJohn

Description

@BasilJohn

I upgraded react native from 0.56 to 0.59.8 using the rn diff tool.
The code builds successfully however the app crashes immediately after launch.

React Native version:
React Native : 0.59.8

Steps To Reproduce

1.Upgrade to RN 0.59.8 using RN DIFF tool
2.Run command "react-native run-android"

I get the below error when i do a logcat from Android Studio.

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.libertyhk.eClaim/com.libertyhk.eClaim.MainActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.

Though the android:theme is using AppCompat i still see the same issue.

---Below ins my styles.xml file

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
    <!-- Customize your theme here. -->
</style>

<!--<style name="SplashTheme" parent="Theme.AppCompat.NoActionBar">-->
    <!--<item name="android:windowBackground">@drawable/background_splash</item>-->
<!--</style>-->

<style name="SplashTheme" parent="AppTheme">
    <item name="android:windowBackground">@drawable/background_splash</item>
</style>

Describe what you expected to happen:
Expected behaviour to get the app running on android.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions