Search code examples
androidunreal-engine4unreal-blueprint

Error while deploying FirstPersonExample Map to android


I have successfully installed CodeWorksforAndroid 1R6 on my windows10 PC for executing the unreal engine files to android device.

I have taken starterkit (blueprint) files of unreal engine FirstPersonExampleMap to execute on android.

The launcher is showing the connected android devices. When i select the android device, the process gets started and while depolying i get the error and BUILD is getting failed.

Please help to resolve the issue.

Error -

====17-04-2017 07:09:09====UPDATING BUILD CONFIGURATION FILES====================================================
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 downloader_library...
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.

I have already updated the android sdk, android ndk location in project setting

My Android handset is HTC One E9s dual Sim with Android Version 5.0.2

Update

I checked the project.properties, where the android-target is 19 (android-19) which i have mentioned in the NDK API Level in project setting of unreal editor. Still not detecting.

New ERROR

LogPlayLevel: ====17-04-2017 10:36:55====PERFORMING FINAL APK PACKAGE OPERATION================================================
LogPlayLevel: UEDeployAndroid.RunCommandLineProgramAndReturnResult: Making .apk with Ant... (note: it's safe to ignore javac obsolete warnings)
LogPlayLevel: BUILD FAILED
LogPlayLevel: C:\NVPACK\android-sdk-windows\tools\ant\build.xml:538: Application package '' must have a minimum of 2 segments.
LogPlayLevel: Total time: 7 seconds
LogPlayLevel: UEDeployAndroid.RunCommandLineProgramAndReturnResult: Making .apk with Ant again to show errors
LogPlayLevel: Buildfile: C:\Users\Amul\Documents\Unreal Projects\MobFP\Intermediate\Android\APK\build.xml
LogPlayLevel: [getbuildtools] Using latest Build Tools: 24.0.0
LogPlayLevel: -set-mode-check:
LogPlayLevel: -set-debug-files:
LogPlayLevel: -check-env:
LogPlayLevel:  [checkenv] Android SDK Tools Revision 24.4.1
LogPlayLevel:  [checkenv] Installed at C:\NVPACK\android-sdk-windows
LogPlayLevel: -setup:
LogPlayLevel:      [echo] Project Name: MobFP
LogPlayLevel:   [gettype] Project Type: Application
LogPlayLevel: -set-debug-mode:
LogPlayLevel: -debug-obfuscation-check:
LogPlayLevel: -pre-build:
LogPlayLevel: -build-setup:
LogPlayLevel: [getbuildtools] Using latest Build Tools: 24.0.0
LogPlayLevel:      [echo] Resolving Build Target for MobFP...
LogPlayLevel: [gettarget] Project Target:   Android 4.4.2
LogPlayLevel: [gettarget] API level:        19
LogPlayLevel: BUILD FAILED
LogPlayLevel: C:\NVPACK\android-sdk-windows\tools\ant\build.xml:538: Application package '' must have a minimum of 2 segments.
LogPlayLevel: Total time: 4 seconds
LogPlayLevel: Program.Main: ERROR: AutomationTool terminated with exception: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\Amul\Documents\Unreal Projects\MobFP\Intermediate/Android/APK/bin/MobFP-debug.apk'.
LogPlayLevel:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
LogPlayLevel:    at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
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: 264.869673
LogPlayLevel: BUILD FAILED
PackagingResults:Error: Error Launch failed! Unknown Error

Solution

    1. Check your android SKD paths. Take a look at "Project Settings->Platforms->Android SDK" and check paths you have entered in those boxes, or check JAVA_HOME environment variable in case you left those boxes blank.
    2. Go to your 'android-sdk-windows/tools' folder (the one you got installed from CodeWorks installer) and open android.bat. It schould run SDK Manager GUI, where you can check SKD versions installed. Check if there is SKD version 19 present. If no you could install it, or change your project for never version that is already installed.