Download

Error when launching UE4 Android Game on Android Device

i am trying to launch my UE4 Android Game onto my Android Device, but I get an error when it is in the BUILD Phase.


LogPlayLevel: UEDeployAndroid.RunCommandLineProgramWithException: Updating project.properties, local.properties, and build.xml for play-services-tasks-9.2.0...
LogPlayLevel: Error: Target id 'android-19' is not valid. Use 'android.bat list targets' to get the target ids.
LogPlayLevel: Error: Target id 'android-19' is not valid. Use 'android.bat list targets' to get the target ids.
LogPlayLevel: UEDeployAndroid.RunCommandLineProgramWithException: Updating project.properties, local.properties, and build.xml for support-v4-23.0.0...
LogPlayLevel: Error: Target id 'android-19' is not valid. Use 'android.bat list targets' to get the target ids.
LogPlayLevel: Program.Main: ERROR: AutomationTool terminated with exception: System.IO.FileNotFoundException: Could not find file 'C:\Users\Alex\Documents\Unreal Projects	estAndroid\Intermediate\Android\APK\build.xml'.
LogPlayLevel: File name: 'C:\Users\Alex\Documents\Unreal Projects	estAndroid\Intermediate\Android\APK\build.xml'
LogPlayLevel:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
LogPlayLevel:    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
LogPlayLevel:    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
LogPlayLevel:    at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
LogPlayLevel:    at System.IO.StreamReader..ctor(String path, Encoding encoding)
LogPlayLevel:    at System.IO.File.InternalReadAllLines(String path, Encoding encoding)
LogPlayLevel:    at UnrealBuildTool.UEDeployAndroid.UpdateBuildXML(String UE4Arch, String NDKArch, String EngineDir, String UE4BuildPath)
LogPlayLevel:    at UnrealBuildTool.UEDeployAndroid.MakeApk(AndroidToolChain ToolChain, String ProjectName, String ProjectDirectory, String OutputPath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bMakeSeparateApks, Boolean bIncrementalPackage, Boolean bDisallowPackagingDataInApk, Boolean bDisallowExternalFilesDir)
LogPlayLevel:    at UnrealBuildTool.UEDeployAndroid.PrepForUATPackageOrDeploy(FileReference ProjectFile, String ProjectName, String ProjectDirectory, String ExecutablePath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bIsDataDeploy)
LogPlayLevel:    at AndroidPlatform.Deploy(ProjectParams Params, DeploymentContext SC)
LogPlayLevel:    at Project.Deploy(ProjectParams Params)
LogPlayLevel:    at BuildCookRun.DoBuildCookRun(ProjectParams Params)
LogPlayLevel:    at BuildCookRun.ExecuteBuild()
LogPlayLevel:    at AutomationTool.BuildCommand.Execute()
LogPlayLevel:    at AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
LogPlayLevel:    at AutomationTool.Automation.Process(String] Arguments)
LogPlayLevel:    at AutomationTool.Program.MainProc(Object Param)
LogPlayLevel:    at AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param)
LogPlayLevel:    at AutomationTool.Program.Main()
LogPlayLevel: Program.Main: AutomationTool exiting with ExitCode=1 (Error_Unknown)
LogPlayLevel: Completed Launch On Stage: Deploy Task, Time: 101.836433
LogPlayLevel: BUILD FAILED
PackagingResults:Error: Error Launch failed! Unknown Error


Why would this be?

You don’t have android-19 SDK platform installed. Check your android-sdk-windows/platforms for android-19. You can run android.bat to install it.

Hello, thanks for the response.
Is it the API (API 19) that it is saying I do not have?
I have installed API 21 and changed the target in UE4 to 21 and it says the same thing but instead of android-19 it says android-21 and i have confirmed that API 21 is installed.

Are you using 4.16? Probably best to create an AnswerHub and post the full log at this point.