[Android studio|Java] Manifest merger failed: Apps targeting Android 12 오류 해결

육각형 기획자·2021년 9월 7일
0

Android Studio

목록 보기
2/2

처음 안드로이드 스튜디오를 디버깅할 때 다음과 같은 오류가 나서 앱 구동이 안됐다.
Manifest merger failed: Apps targeting Android 12 and higher are required to specify an explicit value for android: exported when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.

해결법 : 이는 manifests(매니페스트) 문제다.
[manifests] 파일->[AndroidManifest.xml]에 들어가 아래 한 줄을 추가해준다.

android:exported="true"

그럼 오류가 사라진다.

AndroidManifest.xml 전체 코드

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

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.Vellog_login">
        <activity
            android:name=".Signup"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:label="@string/title_activity_signup"
            android:theme="@style/Theme.Vellog_login.Fullscreen"/>
        <activity
            android:name=".Login"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:label="@string/title_activity_login"
            android:exported="true"
            android:theme="@style/Theme.Vellog_login.Fullscreen" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

    </application>

</manifest>

1개의 댓글

comment-user-thumbnail
2023년 1월 22일

이번에 안드로이드 스튜디오 공부하게 되면서 코드 따라해보며 배우고 있었는데 retrofit2 POST/GET 연결 부분에 대한 내용이 안보이는데.. 혹시 더이상 회원가입 건으로 업로드가 없는걸까요..? ㅠㅠ

답글 달기