Closed narek11 closed 6 years ago
Same here, I spent two days fiddling with this white screen trying to understand what was wrong. no luck. React Native 0.53.3 RNN - 1.1.409
No errors or warnings on gradle build, targeted API is 26+ My MainApplication.java is
package com.archer.eurobloha;
import android.app.Application;
import com.oblador.vectoricons.VectorIconsPackage;
import io.invertase.firebase.RNFirebasePackage;
import com.BV.LinearGradient.LinearGradientPackage;
import io.invertase.firebase.firestore.RNFirebaseFirestorePackage;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.reactnativenavigation.NavigationApplication;
import java.util.Arrays;
import java.util.List;
public class MainApplication extends NavigationApplication {
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new VectorIconsPackage(),
new LinearGradientPackage(),
new RNFirebasePackage(),
new RNFirebaseFirestorePackage()
);
}
@Override
public String getJSMainModuleName() {
return "index";
}
@Override
public boolean isDebug() {
// Make sure you are using BuildConfig from your own application
return BuildConfig.DEBUG;
}
@Override
public List<ReactPackage> createAdditionalReactPackages() {
return getPackages();
}
}
I tried to run the example project in this repo, again the same white screen.
Just npm installed and ran react-native run-android
- seems to work fine. I'm closing the issue as it's a duplicate and there's not enough information.
@guyca why are you closing this?
I am telling you that even the example app brings up white screen and you close this without saying anything?
Give us a project to clone and run that works.
I use genymotion emulator to run them.
@jahglow I went ahead and tried with RNN v2 and same white screen. Please let me know in case you have any success. I will post my success status updates here for you and people.
I am also having this same issue. Steps to reproduce is following the steps from the installation - https://wix.github.io/react-native-navigation/#/installation-android
Except for me. I just kept running react-native run-android
and once it did load. Most times its blank.
Oh wow I found the solution. It seems its the android debug mode timing bug.
When you see the blank screen on startup in android:
1) hit the "square" button to show all open apps 2) Then press on your app 3) voila it renders
Here is screenshots of steps:
This is the bug that was affecting us - https://github.com/wix/react-native-navigation/issues/2180
I'm also experiencing this white screen issue, and just as @narek11 I wonder why it was closed. Seems people are still experiencing this.
The fix suggested @Noitidart does not work for me. I'm stuck!
@jaltin you might have a js error. And also your MainApplication.java should look like this:
package com.wix;
import com.reactnativenavigation.NavigationApplication;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import java.util.Arrays;
import java.util.List;
public class MainApplication extends NavigationApplication {
@Override
public boolean isDebug() {
return BuildConfig.DEBUG;
}
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
);
}
@Override
public List<ReactPackage> createAdditionalReactPackages() {
return getPackages();
}
@Override
public String getJSMainModuleName() {
return "index";
}
}
Yes you are right about the js error being the problem for me @Noitidart.
I had a look in logcat in Android Studio and there I found warnings that I didn't have any icon for my tabs, just label and title was defined for my tabs.
This works ok in iOS but when trying to run without icons on Android it just gives the blank screen and the JS error. Once I added the icon it works well. banging my head against the keyboard for not spotting this earlier .
Thanks for your help!
Thanks for sharing! That's an awesome help! I didn't know about looking at logcat.
I resolve this bug by closing and opening the app again within the genymotion
To fix this I had to run react-native start
in a separate terminal and then run react-native run-android
.
@kennedymj97 This worked. But why ? Is there a difference between running from android studio and running this app using react-native run-android
?
@kennedymj97 Worked For me ....
To fix this I had to run
react-native start
in a separate terminal and then runreact-native run-android
.
@kennedymj97 where should i type this in android studio???
I am facing the same issue, have anyone found any solution for this yet please let me know.
white screen on android
The whole day today I spent trying to build my app on android. But all the builds were successful only blank white screen show up at the end as a result.
I tried to run the example project in this repo, again the same white screen.
I am not sure what is going on or what I am doing wrong.