Error while packaging project for android

UATHelper: Packaging (Android (DXT)): UEDeployAndroid.MakeApk:
UATHelper: Packaging (Android (DXT)): ====7/20/2017 4:04:18 PM====PREPARING TO MAKE APK=================================================================
UATHelper: Packaging (Android (DXT)): ‘xcopy’ is not recognized as an internal or external command,
UATHelper: Packaging (Android (DXT)): operable program or batch file.
UATHelper: Packaging (Android (DXT)): The system cannot find the path specified.
UATHelper: Packaging (Android (DXT)): The system cannot find the path specified.
UATHelper: Packaging (Android (DXT)): The system cannot find the path specified.
UATHelper: Packaging (Android (DXT)): The system cannot find the path specified.
UATHelper: Packaging (Android (DXT)): The system cannot find the path specified.
UATHelper: Packaging (Android (DXT)): The system cannot find the path specified.
UATHelper: Packaging (Android (DXT)): The system cannot find the path specified.
UATHelper: Packaging (Android (DXT)): The system cannot find the path specified.
UATHelper: Packaging (Android (DXT)): The system cannot find the path specified.
UATHelper: Packaging (Android (DXT)): The system cannot find the path specified.
UATHelper: Packaging (Android (DXT)): The system cannot find the path specified.
UATHelper: Packaging (Android (DXT)): The system cannot find the path specified.
UATHelper: Packaging (Android (DXT)): The system cannot find the path specified.
UATHelper: Packaging (Android (DXT)): The system cannot find the path specified.
UATHelper: Packaging (Android (DXT)): The system cannot find the path specified.
UATHelper: Packaging (Android (DXT)): The system cannot find the path specified.
UATHelper: Packaging (Android (DXT)): The system cannot find the path specified.
UATHelper: Packaging (Android (DXT)): The system cannot find the path specified.
UATHelper: Packaging (Android (DXT)): The system cannot find the path specified.
UATHelper: Packaging (Android (DXT)): The system cannot find the path specified.
UATHelper: Packaging (Android (DXT)): The system cannot find the path specified.
UATHelper: Packaging (Android (DXT)): The system cannot find the path specified.
UATHelper: Packaging (Android (DXT)): Program.Main: ERROR: AutomationTool terminated with exception: ERROR: Can’t make an APK without an API installed (see “android.bat list targets”)
UATHelper: Packaging (Android (DXT)): Program.Main: AutomationTool exiting with ExitCode=1 (Error_Unknown)
UATHelper: Packaging (Android (DXT)): BUILD FAILED
PackagingResults:Error: Error Unknown Error

For some reason or another your system can’t find the xcopy command. What OS/setup are you building on? Would also be worth checking your PATH environment variable to see that the path to where xcopy is stored is referenced there.

Did you install the SDKs with CodeWorks for Android? The error message indicates you either don’t have android.bat or are missing the platform SDKs.

I use Windows 10

Yeah i installed codeworks for android and i also have android.bat too :slight_smile:

Have you tried running “android.bat list targets”? It seems to me there is an issue with the install.

UATHelper: Packaging (Android (All)): UEDeployAndroid.MakeApk:
UATHelper: Packaging (Android (All)): ====7/26/2017 10:33:13 PM====PREPARING TO MAKE APK=================================================================
UATHelper: Packaging (Android (All)): Program.Main: ERROR: AutomationTool terminated with exception: System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
UATHelper: Packaging (Android (All)): at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
UATHelper: Packaging (Android (All)): at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
UATHelper: Packaging (Android (All)): at UnrealBuildTool.UEDeployAndroid.GetLatestSDKApiLevel(AndroidToolChain ToolChain)
UATHelper: Packaging (Android (All)): at UnrealBuildTool.UEDeployAndroid.GetSdkApiLevel(AndroidToolChain ToolChain)
UATHelper: Packaging (Android (All)): 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 bDisallowExter
nalFilesDir)
UATHelper: Packaging (Android (All)): at UnrealBuildTool.UEDeployAndroid.PrepForUATPackageOrDeploy(FileReference ProjectFile, String ProjectName, String ProjectDirectory, String ExecutablePath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bIsDataDeploy)
UATHelper: Packaging (Android (All)): at AndroidPlatform.Package(ProjectParams Params, DeploymentContext SC, Int32 WorkingCL)
UATHelper: Packaging (Android (All)): at Project.Package(ProjectParams Params, Int32 WorkingCL)
UATHelper: Packaging (Android (All)): at BuildCookRun.DoBuildCookRun(ProjectParams Params)
UATHelper: Packaging (Android (All)): at BuildCookRun.ExecuteBuild()
UATHelper: Packaging (Android (All)): at AutomationTool.BuildCommand.Execute()
UATHelper: Packaging (Android (All)): at AutomationTool.Automation.Execute(List1 CommandsToExecute, CaselessDictionary1 Commands)
UATHelper: Packaging (Android (All)): at AutomationTool.Automation.Process(String] Arguments)
UATHelper: Packaging (Android (All)): at AutomationTool.Program.MainProc(Object Param)
UATHelper: Packaging (Android (All)): at AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param)
UATHelper: Packaging (Android (All)): at AutomationTool.Program.Main()
UATHelper: Packaging (Android (All)): Program.Main: AutomationTool exiting with ExitCode=1 (Error_Unknown)
UATHelper: Packaging (Android (All)): BUILD FAILED
PackagingResults:Error: Error Unknown Error

i fixed that but there is new error

This is a failure to run the android.bat file. Are you sure you have it installed and the ANDROID_HOME environment variable is pointing to the nvpack/android-sdk-windows directory?

How to check that ??

LOOK IT’s correct

Other possibilities are permission issue with accessing the file or the platform SDK tools were updated (android.bat was removed in newer releases). Post the contents of C:\NVPACK\android-sdk-windows ools\source.properties. You don’t want Pkg.Revision past 25.2.5. Android Studio will update this to a version that doesn’t work.

I reccomend
Unninstall nvidia codeworks and android studio if you have it
Delete folders
Uninstall 4.16 folder.(i guess you are using 4.16)
Reboot
Install ue4 engine again
Install nvidia codeworks from extras folder in programfiles/epic/…
Create a blank android project
Test and post results

Open C:
vpack\android-sdk-windows ools\source.properties; it is a text file. Post the contents of this file, please.

ard, Java class file shrinker, optimizer, obfuscator, and preverifier

This distribution contains the following directories:

  • bin : simple wrapper scripts to run ProGuard, its GUI, and ReTrace
  • lib : the main jars, compiled and ready to use with “java -jar …”
  • docs : the complete documentation, licenses, etc. in html format
  • examples : some example configuration files
  • src : the source code
  • buildscripts : various alternative build scripts

The best place to start is docs/index.html

Example

If you want to give ProGuard a spin right away, try processing the ProGuard
jar itself:

cd examples
java -jar ../lib/proguard.jar @proguard.pro

The resulting proguard_out.jar contains the same application, but it’s a lot
smaller.

Enjoy!

Copyright (c) 2002-2015 @ GuardSquare

While packaging for es2.0 android device, output log shows error in landscape material compilation. What to do? I am using ue4 4.15.3

You can see the log file where it says “Cannot access field LayerWeights of structure”. How to resolve even when mobile texture samplers show only 3 ?? Please help… I have been stuck on it for days.

CAN YOU FIX THIS THROUGH TEAM VIEWER??, Please :slight_smile: :slight_smile: :slight_smile:

Hi sajal_regmi,

This does not look like what would be expected to be found in the source.properties file. Did you open the correct file? It may be a good idea to try posting on our AnswerHub as well, in order to have more visibility on your question.

Hi, having the exact same problem…does anyone have the solution yet?

my source.properties
Pkg.UserSrc=false
Pkg.Revision=24.4.1
Platform.MinPlatformToolsRev=20