question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android App Crashing on Open

See original GitHub issue

For anyone with this issue I spent a bit of time trying to figure out how to solve it. This library works well for me on ios and I didn’t want to have two different libraries for the different operating systems. If you are having this issue, in MainActivity.java: instead of SplashScreen.show(this); use SplashScreen.show(this, true);

The problem is in the supporting Java file, SplashScreen.java. This is the default call which calls another method called show(final Activity activity, final boolean fullScreen). public static void show(final Activity activity) { show(activity, false); }

Because it calls it with ‘false’, the second style is used which React Native can’t figure out and it crashes. on line ~31 `mSplashDialog = new Dialog(activity, fullScreen ? R.style.SplashScreen_Fullscreen : R.style.SplashScreen_SplashTheme);’

If you just call show(final Activity activity, final boolean fullScreen) directly with ‘true’ as the second argument, it should be able to figure out the first style and it will work.

Please update the documentation

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:10
  • Comments:61 (1 by maintainers)

github_iconTop GitHub Comments

71reactions
ethan6077commented, Feb 8, 2018

Yes, adding “android/app/src/main/res/values/colors.xml” solved the problem. Just add a “primary_dark” value to the file like this.

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="primary_dark">#000000</color>
</resources>
48reactions
MurugappanVcommented, Jan 31, 2018

crashing even after changing to SplashScreen.show(this, true);

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why do my apps keep crashing on Android, How to fix it
The easiest way to fix an app that keeps crashing on your Android smartphone is to simply force stop it and open it...
Read more >
11 Quick Ways to Fix Apps Keep Crashing on Android - iMobie
Go to “Settings” > Apps > Find the app that keeps crashing. · Go to Settings > “Apps” or “Application manager” > Choose...
Read more >
Why Do My Apps Keep Crashing on Android? - Avast
1. The “Force stop” method · 2. Restart your Android device · 3. Keep your phone updated · 4. Clear your cached data...
Read more >
Apps keep crashing on Android? Here's what to do
You can try force-stopping an app if it freezes or crashes. Go to Settings > Apps > See all apps > (app name)...
Read more >
8 Ways to Fix Android Apps Crashing - MakeUseOf
8 Ways to Fix Android Apps Crashing · 1. Check the Internet Connection · 2. Restart the Crashing App · 3. Restart Your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found