• 카테고리

    질문 & 답변
  • 세부 분야

    모바일 앱 개발

  • 해결 여부

    미해결

SplashActivity.kt 에러가 나네요

23.07.23 16:01 작성 23.07.23 16:02 수정 조회수 505

0

@Suppress("DEPRECATION")
class SplashActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_splash)

        Handler().postDelayed({
            startActivity(Intent(this, MainActivity::class.java))
            finish()
        },  10000)
    }
}

늘 수고하심에 감사드리고
아래와 같은 에러가 나오네요 
그래서인지 splash.png 화면도 안뜨네요 
The application should not provide its own launch screen

답변 2

·

답변을 작성해보세요.

0

shafeel2님의 프로필

shafeel2

질문자

2023.07.24

답변감사드립니다

git 에 파일올려 두었습니다

https://github.com/dongguntechnology/lec_twice/tree/main/app/src

<!--        <item name="windowNoTitle">false</item>-->

이 부분을 주석처리해주세요.

image

 

shafeel2님의 프로필

shafeel2

질문자

2023.07.26

잘 해결되었습니다

님의 수고에 다시한번 감사드립니다

늘 건강하시고 부자되세요

그리고 주석처리하는 이유도 알 수 있을까요 ???

프로젝트 생성했을 때 원래 없는 코드입니다.

이 부분때문에 에러가 발생해서 삭제해줬습니다.

0

AndroidMenifest.xml 파일을 수정하셨나요?

어떻게 수정하셨는지 알려주세요.

shafeel2님의 프로필

shafeel2

질문자

2023.07.23

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">

    <application
        android:allowBackup="true"
        android:dataExtractionRules="@xml/data_extraction_rules"
        android:fullBackupContent="@xml/backup_rules"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.Twice"
        tools:targetApi="31">
        <activity android:name=".SplashActivity"
            android:exported="true">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
        </activity>
        <activity
            android:name=".MainActivity"
            android:exported="true">

        </activity>
    </application>

</manifest>

제가 동일한 코드로 해보니 잘 되는데
전체 코드를 압축해서 구글 드라이브에 올리시고 링크를 공유해주시면 살펴보겠습니다.