AndroidManifest.xml
파일은 프로젝트 세팅 의 Advanced APK Packaging (고급 APK 패키징) 섹션에 설정된 다양한 Android 시스템 권한과 세팅을 저장하는 데 사용됩니다. 여기서는 언리얼 엔진(UE) 프로젝트의 요구사항 충족을 위해 AndroidManifest.xml
파일에 추가시킬 명령을 입력하는 법을 다뤄보겠습니다.
Android Manifest Location
프로젝트의 AndroidManifest.xml 파일을 찾기 전, 먼저 프로젝트를 패키징하거나 Android 디바이스에 디플로이 해야합니다. 프로젝트 빌드 또는 디플로이가 완료되었으면, (YourProjectName)\\Intermediate\Android\arm64
에서 AndroidManifest.xml
파일을 찾을 수 있습니다.
클릭하면 이미지 원본을 확인합니다.
어떤 상황에서도 AndroidManifest.xml
파일을 편집해서는 안됩니다. AndroidManifest.xml
파일을 편집할 필요가 있으면 UE 에디터 내 Advanced APK Packing 섹션에서 해야 합니다.
Android Manifest 레이아웃
전형적인 AndroidManifest.xml
파일에서는 다음과 같은 세 가지 섹션을 찾을 수 있습니다.
- Application Definition
- Activity
-
Requirements
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.YourCompany.Project" android:versionCode="1" android:versionName="1.0."> <-- Application Definition --> <application android:label="@string/app_name" android:icon="@drawable/icon" android:hasCode="true"> <activity android:name="com.epicgames.unreal.GameApplication" </activity> </application> <-- Requirements --> <uses-sdk android:minSdkVersions="9"/> <uses-feature android android:glEsVersion="0x00020000" android:required="true" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> </manifest>
참고로 위의 Android Manifest 파일은 실제 파일이 아니며 단순 참고용입니다.
Extra Tags for Manifest
Advanced APK Packaging 섹션에서 Extra Tags for <manifest> node 를 찾습니다. 매니페스트에 태그를 추가로 붙일 수 있는데, 더하기 아이콘을 클릭하여 태그 배열에 엘리먼트를 새로 추가한 뒤 입력창에 사용하고자 하는 태그를 입력하면 됩니다. 이 예제에서 사용된 태그는 다음과 같습니다: android:sharedUserId="Foo"
클릭하면 이미지 원본을 확인합니다.
Extra Tags for <manifest> node 섹션에 입력된 태그는 AndroidManifest.xml
파일의 manifest 섹션에 추가됩니다.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.YourCompany.Project"
android:sharedUserId="Foo"
android:versionCode="1"
android:versionName="1.0">
Extra Tags for Application
Advanced APK Packaging 섹션에서 Extra Tags for <manifest> node 를 찾습니다. 어플리케이션에 태그를 추가로 붙일 수 있는데, 마찬가지로 더하기 아이콘을 클릭하여 어플리케이션 배열에 엘리먼트를 새로 추가한 뒤 사용하고자 하는 태그를 입력하면 됩니다. 이 예제에서 사용된 태그는 다음과 같습니다: android:hardwareAccelerated="True"
클릭하면 이미지 원본을 확인합니다.
Extra Tags for <application> node 섹션에 입력된 항목은 AndroidManifest.xml
파일의 Application Definition 섹션에 추가됩니다.
<application android:label="@string/app_name"
android:icon="@drawable/icon"
android:hardwareAccelerated="True"
android:hasCode="true">
Extra Settings for Application
Advanced APK Packaging 섹션에서 Extra Settings for <application> section (\n to separate lines) 을 찾습니다. 어플리케이션에 사용할 부가 세팅을 추가할 수 있는데, 사용하고자 하는 세팅을 Extra Settings for < application> 섹션에 입력하면 됩니다. 사용하고자 하는 세팅이 둘 이상인 경우, 각 세팅을 \n 로 구분해 주면 됩니다. 이 예제에서 추가한 항목은 다음 두 가지입니다: android:banner="Foo", android:vmSafeMode="True"
클릭하면 이미지 원본을 확인합니다.
Extra Settings for <application> 섹션에 입력된 항목은 AndroidManifest.xml
파일의 Activity 섹션에 추가됩니다.
</activity>
<activity android:name=".DownloaderActivity" android:screenOrientation="sensorLandscape" android:configChanges="mcc|mnc|uiMode|density|screenSize|orientation|keyboardHidden|keyboard" android:theme="@style/UnrealSplashTheme" />
<meta-data android:name="com.epicgames.unreal.GameActivity.DepthBufferPreference" android:value="0" />
<meta-data android:name="com.epicgames.unreal.GameActivity.bPackageDataInsideApk" android:value="false" />
<meta-data android:name="com.epicgames.unreal.GameActivity.bVerifyOBBOnStartUp" android:value="false" />
<meta-data android:name="com.epicgames.unreal.GameActivity.bShouldHideUI" android:value="true" />
<meta-data android:name="com.epicgames.unreal.GameActivity.ProjectName" android:value="AndroidProject" />
<meta-data android:name="com.epicgames.unreal.GameActivity.bHasOBBFiles" android:value="true" />
<meta-data android:name="com.epicgames.unreal.GameActivity.bSupportsVulkan" android:value="true" />
<meta-data android:name="com.google.android.gms.games.APP_ID" android:value="@string/app_id" />
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
<activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
android:banner="Foo"
android:vmSafeMode="True"
<service android:name="OBBDownloaderService" /><receiver android:name="AlarmReceiver" /></application>
Extra Tags for com.epicgames.unreal Game Activity
You can add additional tags for the Extra Tags for com.epicgames.unreal.GameActivity activity node by clicking on the Plus sign icon to add a new element to the Extra Tags for com.epicgames.unreal.GameActivity
클릭하면 이미지 원본을 확인합니다.