react-native-ui-kitten icon indicating copy to clipboard operation
react-native-ui-kitten copied to clipboard

Black screen in startup of app

Open ashadnasim52 opened this issue 2 years ago • 2 comments

🐛 Bug Report

When I open the release apk which is made using kitten UI, the app shows a black screen at startup for at least 2 to 4 seconds

To Reproduce

Install Kitten UI and add theme like this

 <ApplicationProvider {...eva} theme={{...eva.light, ...theme}}>
          <NavigationContainer>
            <Main />
          </NavigationContainer>
          <Index />
        </ApplicationProvider>

Expected behavior

no black screen should Come

UI Kitten and Eva version

Package Version
"@ui-kitten/components": "^5.3.1",
"@ui-kitten/eva-icons": "^5.3.1",
"@eva-design/eva": "^2.2.0",

metro-config code

const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
const MetroConfig = require('@ui-kitten/metro-config');

const evaConfig = {
  evaPackage: '@eva-design/eva',
  // Optional, but may be useful when using mapping customization feature.
  customMappingPath: './mapping.json',
};

// Make sure to handle any errors that might occur during configuration
module.exports = async () => {
  try {
    const defaultConfig = await getDefaultConfig(__dirname);

    // Use mergeConfig from @react-native/metro-config to merge configurations
    const mergedConfig = mergeConfig(defaultConfig, {
      // Add your custom configuration options here if needed
    });

    // Create the final configuration using @ui-kitten/metro-config
    const finalConfig = MetroConfig.create(evaConfig, mergedConfig);

    return finalConfig;
  } catch (error) {
    // Handle errors appropriately, e.g., log them or throw
    console.error('Error configuring Metro bundler:', error);
    throw error;
  }
};

ashadnasim52 avatar Sep 09 '23 12:09 ashadnasim52

@ashadnasim52 Hi, were you able to find a solution?

umer-nazir02 avatar Sep 18 '24 10:09 umer-nazir02

same issue

marcoburrometo avatar Dec 22 '24 13:12 marcoburrometo