Not working with modified MainActivity for react-native-navigation
See original GitHub issueUnfortunately the app crash on launch. Maybe this is due to the fact that the mainactivity class has been modified which extends the SplashActivity
from com.reactnativenavigation.controllers.SplashActivity
rather than the old school ReactActivity
class.
Yes, I’m using the react-native-navigation
by wix (https://github.com/wix/react-native-navigation)
Here’s the full code of my MainActivity.java
, maybe I’m just doing something wrong.
import org.devio.rn.splashscreen.SplashScreen;
import com.reactnativenavigation.controllers.SplashActivity;
import android.os.Bundle;
public class MainActivity extends SplashActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
SplashScreen.show(this); // here
super.onCreate(savedInstanceState);
}
}
If anyone had a similar problem, please let me know for any solution thanks.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:9
- Comments:23
Top Results From Across the Web
Why is my react navigation not working on android?
Actually the problem was being caused by another package that was just added to the project and wasn't setup and being used. The...
Read more >Getting started - React Navigation
React Navigation is born from the React Native community's need for an extensible yet ... be sure to make the necessary modifications to...
Read more >Upgrading from 3.x - React Navigation - Netlify
To finalize installation of react-native-gesture-handler for Android, make the following modifications to MainActivity.java :.
Read more >Add a splash screen to a React Native app - Medium
Also note that I'm not an iOS nor Android developer, so some steps may surely be improved. I'll be happy to read how...
Read more >Migrating off RNGHEnabledRootView | React Native Gesture ...
Migrating off RNGHEnabledRootView · Update MainActivity.java · Check if your app works correctly · Update your JS code.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
same problem here, when to try
adb logcat
I found errorCan't convert to color:type=0x1
solve by: created file
android/app/src/main/res/values/colors.xml
and setting content<?xml version="1.0" encoding="utf-8"?> <resources> <color name="primary_dark">#660B0B0B</color> </resources>
now splash screen working well with react-native-navigation on android and ios
MainActivity.java
Same problem, and I wondered which step was wrong until saw this issue…