I’m trying to package my project in UE4.27 and this is the error I get:
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ERROR: AndroidManifest.xml is invalid System.Xml.XmlException: ‘android’ is an unexpected token. The expected token is ‘=’. Line 5, position 11.
While this is the Log output:
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ====5.9.2024. 17:44:46====PREPARING TO MAKE APK=================================================================
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): bBuildForES31: true
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): bSupportsVulkan: false
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Building Java with SDK API level 'android-35'
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Building with Build Tools version '35.0.0'
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ==== Writing to shim file F:\nb1igra\Build\Android\src\com\epicgames\ue4\DownloadShim.java ====
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ==== Shim data file up to date so not writing. ====
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ==== Writing to template target file F:\nb1igra\Build\Android\src\com\YourCompany\nb1igra\AlarmReceiver.java ====
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ==== Template target file up to date so not writing. ====
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ==== Writing to template target file F:\nb1igra\Build\Android\src\com\YourCompany\nb1igra\DownloaderActivity.java ====
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ==== Template target file up to date so not writing. ====
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ==== Writing to template target file F:\nb1igra\Build\Android\src\com\YourCompany\nb1igra\OBBDownloaderService.java ====
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ==== Template target file up to date so not writing. ====
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Cleaning up files based on template dir F:\nb1igra\Build\Android\src\com\YourCompany\nb1igra
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Previous .apk file(s) were made with different build settings, forcing repackage.
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): UPL Init: armeabi-v7a
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): XsollaLogin UPL initialization
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): XsollaStore UPL initialization
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Subsystem Google Play SDK Android init
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Android Permission Plugin Init
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Google Cloud Messaging init
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): GCMClientSenderID set: false
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): GooglePAD Plugin Init
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): GooglePAD enabled: false
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Oculus mobile init
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Oculus Signature Files (osig) will be removed from APK
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Android Voice init
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): HWCPipe init
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): heapprofd init
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Unsupported architecture: armeabi-v7a
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): GoogleGameSDK Android init
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): On build machine.
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Fixing minSdkVersion; NDK level above 19 requires minSdkVersion of 21 (arch=armv7)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): ERROR: AndroidManifest.xml is invalid System.Xml.XmlException: 'android' is an unexpected token. The expected token is '='. Line 5, position 11.
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at System.Xml.XmlTextReaderImpl.Throw(Exception e)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at System.Xml.XmlTextReaderImpl.ParseAttributes()
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at System.Xml.XmlTextReaderImpl.ParseElement()
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at System.Xml.Linq.XDocument.Parse(String text, LoadOptions options)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): at UnrealBuildTool.UEDeployAndroid.GenerateManifest(AndroidToolChain ToolChain, String ProjectName, TargetType InTargetType, String EngineDirectory, Boolean bIsForDistribution, Boolean bPackageDataInsideApk, String GameBuildFilesPath, Boolean bHasOBBFiles, Boolean bDisableVerifyOBBOnStartUp, Str
ing UE4Arch, String GPUArch, String CookFlavor, Boolean bUseExternalFilesDir, String Configuration, Int32 SDKLevelInt, Boolean bIsEmbedded, Boolean bEnableBundle) in D:\Build\++UE4\Sync\Engine\Source\Programs\UnrealBuildTool\Platform\Android\UEDeployAndroid.cs:line 2884
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <?xml version="1.0" encoding="utf-8"?>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <manifest xmlns:android="http://schemas.android.com/apk/res/android"
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): package="com.YourCompany.nb1igra"
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): AndroidManifest.xml
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): android:installLocation="internalOnly"
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): android:versionCode="1"
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): android:versionName="1.0">
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)):
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <!-- Application Definition -->
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <application android:label="@string/app_name"
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): android:icon="@drawable/icon"
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): android:hardwareAccelerated="true"
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): android:extractNativeLibs="true"
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): android:name="com.epicgames.ue4.GameApplication"
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): android:requestLegacyExternalStorage="true"
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): android:hasCode="true">
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <activity android:name="com.epicgames.ue4.SplashActivity"
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): android:label="@string/app_name"
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): android:theme="@style/UE4SplashTheme"
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): android:launchMode="singleTask"
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): android:screenOrientation="sensorLandscape"
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): android:debuggable="true">
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <intent-filter>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <action android:name="android.intent.action.MAIN" />
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <category android:name="android.intent.category.LAUNCHER" />
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): </intent-filter>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): </activity>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <activity android:name="com.epicgames.ue4.GameActivity"
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): android:label="@string/app_name"
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): android:theme="@style/UE4SplashTheme"
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): android:configChanges="mcc|mnc|uiMode|density|screenSize|smallestScreenSize|screenLayout|orientation|keyboardHidden|keyboard"
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): android:resizeableActivity="false"
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): android:launchMode="singleTask"
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): android:screenOrientation="sensorLandscape"
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): android:debuggable="true">
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <meta-data android:name="android.app.lib_name" android:value="UE4"/>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): </activity>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <activity android:name=".DownloaderActivity"
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): android:screenOrientation="sensorLandscape"
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): android:configChanges="mcc|mnc|uiMode|density|screenSize|orientation|keyboardHidden|keyboard"
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): android:theme="@style/UE4SplashTheme" />
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <meta-data android:name="com.epicgames.ue4.GameActivity.EngineVersion" android:value="4.27.2"/>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <meta-data android:name="com.epicgames.ue4.GameActivity.EngineBranch" android:value="++UE4+Release-4.27"/>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <meta-data android:name="com.epicgames.ue4.GameActivity.ProjectVersion" android:value="1.0.0.0"/>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <meta-data android:name="com.epicgames.ue4.GameActivity.DepthBufferPreference" android:value="0"/>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <meta-data android:name="com.epicgames.ue4.GameActivity.bPackageDataInsideApk" android:value="true"/>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <meta-data android:name="com.epicgames.ue4.GameActivity.bVerifyOBBOnStartUp" android:value="false"/>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <meta-data android:name="com.epicgames.ue4.GameActivity.bShouldHideUI" android:value="true"/>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <meta-data android:name="com.epicgames.ue4.GameActivity.ProjectName" android:value="nb1igra"/>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <meta-data android:name="com.epicgames.ue4.GameActivity.AppType" android:value=""/>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <meta-data android:name="com.epicgames.ue4.GameActivity.bHasOBBFiles" android:value="true"/>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <meta-data android:name="com.epicgames.ue4.GameActivity.BuildConfiguration" android:value="Development"/>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <meta-data android:name="com.epicgames.ue4.GameActivity.CookedFlavors" android:value="ETC2,DXT,ASTC"/>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <meta-data android:name="com.epicgames.ue4.GameActivity.bValidateTextureFormats" android:value="true"/>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <meta-data android:name="com.epicgames.ue4.GameActivity.bUseExternalFilesDir" android:value="false"/>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <meta-data android:name="com.epicgames.ue4.GameActivity.bPublicLogFiles" android:value="false"/>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <meta-data android:name="com.epicgames.ue4.GameActivity.bUseDisplayCutout" android:value="false"/>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <meta-data android:name="com.epicgames.ue4.GameActivity.bAllowIMU" android:value="false"/>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <meta-data android:name="com.epicgames.ue4.GameActivity.bSupportsVulkan" android:value="false"/>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <meta-data android:name="com.epicgames.ue4.GameActivity.StartupPermissions" android:value="android.permission.WRITE_EXTERNAL_STORAGE"/>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <meta-data android:name="com.google.android.gms.games.APP_ID"
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): android:value="@string/app_id" />
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <meta-data android:name="com.google.android.gms.version"
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): android:value="@integer/google_play_services_version" />
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <activity android:name="com.google.android.gms.ads.AdActivity"
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <service android:name="OBBDownloaderService" />
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <receiver android:name="AlarmReceiver" />
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <receiver android:name="com.epicgames.ue4.LocalNotificationReceiver" />
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <receiver android:name="com.epicgames.ue4.MulticastBroadcastReceiver" android:exported="true">
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <intent-filter>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <action android:name="com.android.vending.INSTALL_REFERRER" />
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): </intent-filter>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): </receiver>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <meta-data android:name="android.max_aspect" android:value="2100000.00" />
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): </application>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)):
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <!-- Requirements -->
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <uses-feature android:glEsVersion="0x00030001" android:required="true" />
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <uses-permission android:name="android.permission.INTERNET"/>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <uses-permission android:name="android.permission.WAKE_LOCK"/>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <uses-permission android:name="com.android.vending.CHECK_LICENSE"/>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <uses-permission android:name="android.permission.VIBRATE"/>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): <uses-permission android:name="com.android.vending.BILLING"/>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): </manifest>
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)):
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): (see C:\Users\vedra\AppData\Roaming\Unreal Engine\AutomationTool\Logs\F+UE4+UE_4.27\Log.txt for full exception trace)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): AutomationTool exiting with ExitCode=1 (Error_Unknown)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): BUILD FAILED
PackagingResults: Error: Unknown Error
I saw a post with similar error who tried commenting a line in AndroidManifext.xml but sadly it didn’t work for me.
I tried both development and shipping modes as well as changing NDKs and SDKs