crazycodeboy / react-native-splash-screen

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

fix for new react native versions #648

Open josebrc opened 3 months ago

josebrc commented 3 months ago

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch react-native-splash-screen@3.3.0 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-splash-screen/android/build.gradle b/node_modules/react-native-splash-screen/android/build.gradle
index baef1a9..2261050 100644
--- a/node_modules/react-native-splash-screen/android/build.gradle
+++ b/node_modules/react-native-splash-screen/android/build.gradle
@@ -13,6 +13,9 @@ android {
     compileSdkVersion rootProject.hasProperty('compileSdkVersion') ? rootProject.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION
     buildToolsVersion rootProject.hasProperty('buildToolsVersion') ? rootProject.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION

+    // Aquí defines el namespace para el módulo
+    namespace "org.devio.rn.splashscreen" // Asegúrate de reemplazar esto con el package name correcto
+
     defaultConfig {
         minSdkVersion safeExtGet('minSdkVersion', 16)
         targetSdkVersion rootProject.hasProperty('targetSdkVersion') ? rootProject.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION

This issue body was partially generated by patch-package.