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.09k forks source link

After splash screen appears the following error comes, why? #630

Open RyanKins opened 1 year ago

RyanKins commented 1 year ago
          After splash screen appears the following error comes, why?

Drawable com.fettanmb:layout/launch_screen with resource ID #0x7f0b002f File res/layout/launch_ screen.xml from drawable resource ID #0x7fOb002f Class not found RelativeLayout Didn't find class "RelativeLayout" on path: DexXPathList[[zip file "/data/app/ w~2X6pV5uSDu8iSperw7JtzQ==/ com.fettanmb-6BQm1jQ08RJslOEJKZnulg==/ base.apk"l,nativeLibraryDirectories-(/datal app/~~2X6pV5uSDu8iSperw7 JtzQ==/ com.fettanmb-6BQm1jQ08RJslOEJKZnulg==/ lib/arm64, /data/app/ w2X6pV5uSDu8iSperw7 JtzQ==/ com.fettanmb-6BQm1jQ08RJslOEJKZnulg==/ base.apk!/lib/arm64-v8a, /system/lib64, / system/system _ext/lib64]

//res/layout/launch_screen.xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <ImageView android:layout_width="match_parent" android:layout_height="match_parent" android:src="@drawable/fettan" />

//res/values/styles.com

Originally posted by @Bisiedigital in https://github.com/crazycodeboy/react-native-splash-screen/issues/432#issuecomment-1730236798

alarner commented 1 year ago

I'm also running into a similar error (Class not found RelativeLayout in launch_screen.xml). It seems to only occur when I try and load the sheet component from tamagui

//res/layout/launch_screen.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="match_parent"
    android:layout_height="match_parent">
    <ImageView android:layout_width="match_parent" android:layout_height="match_parent" android:src="@drawable/screen" android:scaleType="centerCrop" />
</RelativeLayout>

Edit: This seems like a duplicate of #624

Digital-Human-BK commented 1 year ago

Has anyone found a solution? I've just hit the same error but when I try to navigate from the splash screen to another one...

alarner commented 1 year ago

Has anyone found a solution? I've just hit the same error but when I try to navigate from the splash screen to another one...

I switched to https://github.com/zoontek/react-native-bootsplash

Digital-Human-BK commented 1 year ago

Has anyone found a solution? I've just hit the same error but when I try to navigate from the splash screen to another one...

I switched to https://github.com/zoontek/react-native-bootsplash

I did the same, works like a charm.

fikkatra commented 11 months ago

Remove the following line in styles.xml:

<item name="android:editTextBackground">@layout/launch_screen</item>

This line is mentioned in some old documentation and blogposts, but is not necessary (anymore). Just adding launch_screen.xml in the layout directory, works fine.

shahid-0 commented 10 months ago

Remove the following line in styles.xml:

<item name="android:editTextBackground">@layout/launch_screen</item>

This line is mentioned in some old documentation and blogposts, but is not necessary (anymore). Just adding launch_screen.xml in the layout directory, works fine.

This one work for me I just comment the same line mentioned by the @fikkatra

Orla08 commented 10 months ago

Elimine la siguiente línea en estilos.xml:

<item name="android:editTextBackground">@layout/launch_screen</item>

Esta línea se menciona en alguna documentación y publicaciones de blogs antiguas, pero ya no es necesaria. Simplemente agregar launch_screen.xml en el directorio de diseño funciona bien.

Gracias sirvió de mucho 👍👏

vineetkrdixit commented 8 months ago

Remove this line from styles.xml <item name="android:editTextBackground">@layout/launch_screen</item>

vishwas-thangella commented 8 months ago

If you are using TextInput in your component just remove. It work's for me

sagarVentura commented 4 months ago

@fikkatra thanks for providing solution it working

chanakanaveen commented 3 months ago

@fikkatra Thank you. It work's for me

abhilashbhosle commented 2 months ago
@layout/launch_screen

This worked for me, Thankyou!

abhilashbhosle commented 2 months ago

This problem usually occurs in React Native >=0.73. Remove the following line in styles.xml:

<item name="android:editTextBackground">@layout/launch_screen</item>
patidarV1jay commented 2 months ago

Remove the following line in styles.xml:

<item name="android:editTextBackground">@layout/launch_screen</item>

This line is mentioned in some old documentation and blogposts, but is not necessary (anymore). Just adding launch_screen.xml in the layout directory, works fine.

This works for me. However running in windows does not require to remove that line while in mac if line persist it throws the error.