Kotlin
안드로이드 App Bundle API 수준 31 이상을 타겟팅해야 합니다. 해결방법
mean-ji
2022. 11. 17. 16:52
728x90
플레이스토어에 App Bundle 올릴 때
현재 앱이 30의 API 수준을 타겟팅하고 있지만, 보안 및 성능에 최적화된 최신 API를 기반으로 앱을 빌드하려면 API 수준 31 이상을 타겟팅해야 합니다. 앱의 타겟팅 API 수준을 31 이상으로 변경하세요.
라는 에러 메세지가 나왔다.
해결 방법은
1. Preference > Android SDK 에서 Android 12.0을 다운로드
2. bundle.gradle에서 compileSdkVersion 31, targetSdkVersion 31로 변경
3. AndroidManifest.xml에서 activity에 android:exported="true" 추가
<activity
android:name=".activity.TestActivity"
android:screenOrientation="portrait"
android:exported="true"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
출처
728x90