Closed AaronVasquez closed 7 years ago
@AaronVasquez That looks like you're trying to hide the splash screen without showing it first. https://github.com/mehcode/rn-splash-screen/blob/master/android/src/main/java/com/mehcode/reactnative/splashscreen/SplashScreen.java#L25
It shouldn't crash though. Feel free to send a PR that adds an if statement there. Perhaps also a log on the else that warns the developer about hiding without showing.
Thanks for the quick response. I'm not an android dev, so not sure about best practices. What is the best way to log?
Also, it looks like you already check if it's null here: https://github.com/mehcode/rn-splash-screen/blob/master/android/src/main/java/com/mehcode/reactnative/splashscreen/SplashScreen.java#L21
That's not the error. The error in question is stating that mActivity
itself is null. Not that the reference it points to is null. This is telling me that line 21 in Show
is never hit.
Can I see your MainActivity.java
file?
After following the documentation (https://github.com/mehcode/rn-splash-screen/blob/master/docs/android.md), I don't see the error any more. I must've forgotten to set up Android.