crazycodeboy / react-native-splash-screen

A splash screen for react-native, hide when application loaded ,it works on iOS and Android.
MIT License
5.59k stars 1.09k forks source link

Compatibility with Android product flavors #369

Open dev6james opened 5 years ago

dev6james commented 5 years ago

Right now this library depends on the launch_image being located under src/main/res/layout/launch_image.

However, Android allows you to configure product flavors each with their own asset source sets. That means you may have a separate launch_image per source set.

https://developer.android.com/studio/build/build-variants

Using source sets, the path the launch_image would become src/[Product Flavor]/res/layout/launch_image

dev6james commented 5 years ago

Ok, the use of publishNonDefault: true in app/build.gradle solved this for me. I wonder if this should be documented for the library somehow, or if this is out of scope.

yashlinmaistry commented 4 years ago

Hey @dev6james,

Do you have a sample of how you did it?

dooleyb1 commented 2 years ago

Ok, the use of publishNonDefault: true in app/build.gradle solved this for me. I wonder if this should be documented for the library somehow, or if this is out of scope.

@dev6james was this all that needed to be added?

dev6james commented 2 years ago

@dooleyb1 current me does not remember, but I think the comment from past me was accurate at the time! But that was 3 years ago so don't know how newer Android versions impact this. I'm not currently working with React Native.