• 카테고리

    질문 & 답변
  • 세부 분야

    모바일 앱 개발

  • 해결 여부

    해결됨

안드로이드 Default Splash Screen 없애는 방법

23.04.05 13:24 작성 조회수 2.7k

0

안녕하세요 제로초님, Splash Screen을 설정하는 과정 중에 안드로이드에서 Splash Screen이 두 개가 나옵니다. Default Splash Screen과 제가 만든 Splash Screen, 이렇게 두 개가 나오는데 Default Splash Screen을 나오지 않게 하는 방법을 알고 싶습니다.

아래와 같은 순서로 앱이 실행됩니다.

Screenshot_1680668559.png

Screenshot_1680668527.png

답변 1

답변을 작성해보세요.

0

이건 스플래시 스크린 설정을 잘못했다고 밖에 보이지 않습니다. android/app/src/main/res에 있는 기본 이미지들을 지워보세요.

Kang Yul님의 프로필

Kang Yul

질문자

2023.04.05

android/app/src/main/res에 있는 기본 파일들 (mipmap-으로 시작하는 폴더 안의 파일들)을 지웠더니 에러가 발생하였습니다.

그래서 '스플래쉬 스크린(react-native-splash-screen)' 다음 강의인 '앱 아이콘 설정하기' 강의를 듣고 android/app/src/main/res에 mipmap-anydpi-v26 폴더와 ic_launcher.xml 파일을 생성하고 mipmap-으로 시작하는 폴더들 안에 ic_launcher_adaptive_back.png와 ic_launcher_adaptive_fore.png를 생성해주었습니다.

새로운 폴더와 파일을 생성해주니 default splash screen이 새로 생성한 앱 아이콘을 기준으로 바뀌었지만, 그대로 생성됩니다. 혹시 다른 방안이 있을까요?

 

[default splash screen]

image

[두 번째로 나오는 splash screen - launch_screen.png]

image

 

[에러 메세지]

> Task :app:processDebugResources FAILED
189 actionable tasks: 3 executed, 186 up-to-date

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
   > Android resource linking failed
     /Users/scienceshow/Desktop/Maicosmos_RN/android/app/build/intermediates/packaged_manifests/debug/AndroidManifest.xml:19: error: resource mipmap/ic_launcher (aka com.maicosmos:mipmap/ic_launcher) not found.
     /Users/scienceshow/Desktop/Maicosmos_RN/android/app/build/intermediates/packaged_manifests/debug/AndroidManifest.xml:19: error: resource mipmap/ic_launcher_round (aka com.maicosmos:mipmap/ic_launcher_round) not found.
     error: failed processing manifest.


* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org

BUILD FAILED in 6s

확인해보니 안드로이드 12에서 스플래시스크린 동작이 바뀐 것 같네요.

https://stackoverflow.com/questions/72003647/react-native-splash-screen-on-android-12

이런 방식으로 수정된다고는 하는데 돌아가는지는 모르겠습니다.

Kang Yul님의 프로필

Kang Yul

질문자

2023.04.05

아 그렇군요. 한 번 다시 시도해보겠습니다. 친절한 답변 감사합니다.

Kang Yul님의 프로필

Kang Yul

질문자

2023.04.05

제로초님이 공유해주신 stackoverflow 문서대로 작업해보니 default splash screen이 사라졌습니다. 저와 같은 issue가 발생하신 분들은 저 문서를 따라가면 좋을 것 같습니다!