문제 발생
앱 업로드를 진행하려고 하는데 아래와 같은 에러 발생
현재 앱이 30의 API 수준을 타겟팅하고 있지만, 보안 및 성능에 최적화된 최신 API를 기반으로 앱을 빌드하려면 API 수준 31 이상을 타겟팅해야 합니다. 앱의 타겟팅 API 수준을 31 이상으로 변경하세요.
https://developer.android.com/google/play/requirements/target-sdk
관련 페이지를 보니
2022년 8월부터 신규 앱은 API 수준 31(Android 12) 이상을 타겟팅하고 동작 변경사항에 맞게 조정해야 합니다.
Wear OS 앱은 API 수준 28 이상을 타겟팅해야 합니다.
8월부터 신규 앱은 31 이상을 타겟팅 해야하는군요!
Target SDK 버전을 31 (Android 12)로 올려서 빌드하고
테스트를 위해 apk를 설치하려고 하니 아래와 같은 에러가 발생 (그냥 될 리가 없지 ... ) 하면서 설치가 안됨.
adb: failed to install halloweenwallpaper-release.apk:
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl274827136.tmp/base.apk (at Binary XML file line #62):
org.cocos2dx.cpp.AppActivity: Targeting S+ (version 31 and above) requires that an explicit value for
android:exported be defined when intent filters are present]
문제 해결
AndroidManifest.xml 파일에 android:exported 를 true 나 false 로 명시적으로 선언해주면 됩니다.
intent-filter 태그를 포함하고 있어서 android:exported 옵션을 true로 설정.
<activity
android:name="org.cocos2dx.cpp.AppActivity"
android:screenOrientation="portrait"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:launchMode="singleTask"
android:taskAffinity=""
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
https://developer.android.com/guide/topics/manifest/activity-element#exported
'android' 카테고리의 다른 글
구글 플레이 Google Play 언어별 앱설명 확인하기 (0) | 2022.11.23 |
---|---|
No matching client found for package name 빌드 에러 해결 (0) | 2022.10.19 |
파이어베이스 Missing google_app_id. Firebase Analytics disabled. (0) | 2022.08.10 |
안드로이드 Invoke-customs are only supported starting with Android O (--min-api 26) 에러 발생 해결 (0) | 2022.05.19 |
안드로이드 Cannot create a proxy class for abstract class 'GoogleServicesTask'. 에러발생 해결 (0) | 2022.05.12 |