mehcode / rn-splash-screen

A JavaScript-controlled splash-screen for React Native designed to be run directly after the native splash-screen.
MIT License
350 stars 95 forks source link

Only the original thread that created a view hierarchy can touch its views. #54

Closed sibelius closed 7 years ago

sibelius commented 7 years ago

react-native 48.1 rn-splash-screen 5.0.0

error here

https://github.com/mehcode/rn-splash-screen/blob/master/android/src/main/java/com/mehcode/reactnative/splashscreen/SplashScreen.java#L53

ricardofbarros commented 7 years ago

Having the same problem

ronal2do commented 7 years ago
mehcode commented 7 years ago

Merged #53 and released as v5.2

ricardofbarros commented 7 years ago

thank you @mehcode

ronal2do commented 7 years ago

@mehcode Thanks

sinapcs commented 7 years ago

Hi I have this problem on rn-splash-screen v5.2 and react-native 48.4 I guess you should open this issue again.

yasicmd commented 7 years ago

@sinapcs Yeah me too in 0.48.0

sinapcs commented 7 years ago

@yasicmd I solved the problem. The project I'm working on it was using previous versions of rn-splash-screen and it had some extra codes in MainActivity.java

// After react is initialized; set our background color (override splash screen theme)
        getReactNativeHost().getReactInstanceManager().addReactInstanceEventListener(new ReactInstanceManager.ReactInstanceEventListener() {
            @Override
            public void onReactContextInitialized(ReactContext context) {
                // Hide the native splash screen
                getWindow().getDecorView().setBackgroundColor(Color.WHITE);
            }
        });

I removed this code and problem solved

yasicmd commented 7 years ago

@sinapcs Worked for me. thanks for the reply.

joshuapinter commented 6 years ago

For others that might be landing here, my solution was related to having the "Perf Monitor" enabled, as per https://github.com/facebook/react-native/issues/16042#issuecomment-337183484. Try toggling off the Perf Monitor and see if it solves the issue.