Download

Build Failed

I am extremely new to developing VR. I have been following the directions on the Unreal Tutorials for the Samsung Gear VR project creation. I have updated to 4.11.1 and I believe I have followed all the steps necessary. During the packaging and deployment step using Android (ETC2) I am getting the following error:

MainFrameActions: Packaging (Android (ETC2)): BUILD FAILED
MainFrameActions: Packaging (Android (ETC2)): C:\NVPACK\android-sdk-windows ools\ant\build.xml:649: The following error occurred while executing this line:
MainFrameActions: Packaging (Android (ETC2)): C:\NVPACK\android-sdk-windows ools\ant\build.xml:655: null returned: 1
MainFrameActions: Packaging (Android (ETC2)): Total time: 17 seconds
MainFrameActions: Packaging (Android (ETC2)): Program.Main: ERROR: AutomationTool terminated with exception: ERROR: cmd.exe failed with args /c “C:/NVPACK/apache-ant-1.8.2/bin/ant.bat” debug
MainFrameActions: Packaging (Android (ETC2)): Program.Main: AutomationTool exiting with ExitCode=1 (Error_Unknown)
MainFrameActions: Packaging (Android (ETC2)): Domain_ProcessExit
MainFrameActions: Packaging (Android (ETC2)): copying UAT log files…
MainFrameActions: Packaging (Android (ETC2)): BUILD FAILED

As I am still learning and very new I am not sure how to fix this. The phone that I am using is a Samsung S6 Edge with Android version 6.0.1 (Marshmallow). I have gone through all the prerequisites needed to start this process and I am hitting a wall. I am not sure if my folder structure is correct either. I was able to get my OSIG file and I put it in a folder called assets as instructed but it also talks about putting the asset folder in a folder path of \Engine\Build\Android\Java\assets. Is this folder structure something I need to create or is it existing and I simply need to place the assets folder in it? Any information to help a poor newbie like me would be greatly appreciated. Please let me know if there is more information that I need to provide in order to help solve this problem.

Hi ClintVought,

The OSIG file may be placed either in Engine/Build/Android/Java/assets (you need to create the assets directory) if you want it for all your projects, or better place it in your project’s Build/Android/assets directory. The contents of Engine/Build/Android/Java and the project’s Build/Android get combined during the packaging step into Intermediate/Android/APK.

It is a bit hard to see the actual error since I don’t know which build.xml file you have (it changes depending on installed version). The best way to look for issues from running ant is to do so manually after a failed package. Go to your project’s Intermediate/Android/APK directory in a command prompt run “ant debug”. This may show more information about the error not caught in the log (notice for build.xml:649 it said error occurred while executing this line but doesn’t show the line).

Hi Chris. Thank you for getting back to my. I ran the “ant debug”, below is my result. Any help would be appreciated.

Buildfile: C:\Users\clint.vought\Desktop\Unreal Engine 4\Training\FirstPersonShooter\Intermediate\Android\APK\build.xml
[getbuildtools] Using latest Build Tools: 24.0.0 rc2

-set-mode-check:

-set-debug-files:

-check-env:
[checkenv] Android SDK Tools Revision 25.1.1
[checkenv] Installed at C:\NVPACK\android-sdk-windows

-setup:
[echo] Project Name: FirstPersonShooter
[gettype] Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 24.0.0 rc2
[echo] Resolving Build Target for FirstPersonShooter…
[gettarget] Project Target: Android 5.0.1
[gettarget] API level: 21
[echo] ----------
[echo] Creating output directories if needed…
[echo] ----------
[echo] Resolving Dependencies for FirstPersonShooter…
[dependency] Library dependencies:
[dependency]
[dependency] ------------------
[dependency] Ordered libraries:
[dependency]
[dependency] ------------------
[echo] ----------
[echo] Building Libraries with ‘debug’…
Duplicated project name in import. Project custom_rules defined first in C:\Users\clint.vought\Desktop\Unreal Engine 4\Training\FirstPersonShooter\Intermediate\Android\APK\custom_rules.xml and again in C:\Users\clint.vought\Desktop\Unreal Engine 4\Training\FirstPersonShooter\Intermediate\Android\APK\JavaLibs\google-play-services_lib_rev19\custom_rules.xml
[getbuildtools] Using latest Build Tools: 24.0.0 rc2

nodeps:

-set-mode-check:

-set-debug-files:

-check-env:
[checkenv] Android SDK Tools Revision 25.1.1
[checkenv] Installed at C:\NVPACK\android-sdk-windows

-setup:
[echo] Project Name: google-play-services_lib_rev19
[gettype] Project Type: Android Library

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 24.0.0 rc2
[echo] Resolving Build Target for google-play-services_lib_rev19…
[gettarget] Project Target: Android 5.0.1
[gettarget] API level: 21
[echo] ----------
[echo] Creating output directories if needed…
[echo] ----------
[echo] Resolving Dependencies for google-play-services_lib_rev19…
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------

-code-gen:
[mergemanifest] Found Deleted Target File
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
[echo] Handling aidl files…
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files…
[echo] ----------
[echo] Handling Resources…
[aapt] Found Deleted Target File
[aapt] Generating resource IDs…
[echo] ----------
[echo] Handling BuildConfig class…
[buildconfig] No need to generate new BuildConfig.

-pre-compile:

-compile:
[javac] Compiling 1 source file to C:\Users\clint.vought\Desktop\Unreal Engine 4\Training\FirstPersonShooter\Intermediate\Android\APK\JavaLibs\google-play-services_lib_rev19\bin\classes
[echo] Creating library output jar file…

-post-compile:

-obfuscate:

-dex:
[echo] Library project: do not convert bytecode…

-crunch:
[crunch] Crunching PNG Files in source dir: C:\Users\clint.vought\Desktop\Unreal Engine 4\Training\FirstPersonShooter\Intermediate\Android\APK\JavaLibs\google-play-services_lib_rev19\res
[crunch] To destination dir: C:\Users\clint.vought\Desktop\Unreal Engine 4\Training\FirstPersonShooter\Intermediate\Android\APK\JavaLibs\google-play-services_lib_rev19\bin\res
[crunch] Crunched 0 PNG files to update cache

-package-resources:
[echo] Library project: do not package resources…

-package:
[echo] Library project: do not package apk…

-post-package:

-do-debug:
[echo] Library project: do not create apk…
[propertyfile] Updating property file: C:\Users\clint.vought\Desktop\Unreal Engine 4\Training\FirstPersonShooter\Intermediate\Android\APK\JavaLibs\google-play-services_lib_rev19\bin\build.prop
[propertyfile] Updating property file: C:\Users\clint.vought\Desktop\Unreal Engine 4\Training\FirstPersonShooter\Intermediate\Android\APK\JavaLibs\google-play-services_lib_rev19\bin\build.prop
[propertyfile] Updating property file: C:\Users\clint.vought\Desktop\Unreal Engine 4\Training\FirstPersonShooter\Intermediate\Android\APK\JavaLibs\google-play-services_lib_rev19\bin\build.prop
[propertyfile] Updating property file: C:\Users\clint.vought\Desktop\Unreal Engine 4\Training\FirstPersonShooter\Intermediate\Android\APK\JavaLibs\google-play-services_lib_rev19\bin\build.prop

-post-build:

debug:
Duplicated project name in import. Project custom_rules defined first in C:\Users\clint.vought\Desktop\Unreal Engine 4\Training\FirstPersonShooter\Intermediate\Android\APK\custom_rules.xml and again in C:\Users\clint.vought\Desktop\Unreal Engine 4\Training\FirstPersonShooter\Intermediate\Android\APK\JavaLibs\downloader_library\custom_rules.xml
[getbuildtools] Using latest Build Tools: 24.0.0 rc2

nodeps:

-set-mode-check:

-set-debug-files:

-check-env:
[checkenv] Android SDK Tools Revision 25.1.1
[checkenv] Installed at C:\NVPACK\android-sdk-windows

-setup:
[echo] Project Name: downloader_library
[gettype] Project Type: Android Library

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 24.0.0 rc2
[echo] Resolving Build Target for downloader_library…
[gettarget] Project Target: Android 5.0.1
[gettarget] API level: 21
[echo] ----------
[echo] Creating output directories if needed…
[echo] ----------
[echo] Resolving Dependencies for downloader_library…
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------

-code-gen:
[mergemanifest] Found Deleted Target File
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
[echo] Handling aidl files…
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files…
[echo] ----------
[echo] Handling Resources…
[aapt] Found Deleted Target File
[aapt] Generating resource IDs…
[echo] ----------
[echo] Handling BuildConfig class…
[buildconfig] No need to generate new BuildConfig.

-pre-compile:

-compile:
[javac] Compiling 1 source file to C:\Users\clint.vought\Desktop\Unreal Engine 4\Training\FirstPersonShooter\Intermediate\Android\APK\JavaLibs\downloader_library\bin\classes
[echo] Creating library output jar file…

-post-compile:

-obfuscate:

-dex:
[echo] Library project: do not convert bytecode…

-crunch:
[crunch] Crunching PNG Files in source dir: C:\Users\clint.vought\Desktop\Unreal Engine 4\Training\FirstPersonShooter\Intermediate\Android\APK\JavaLibs\downloader_library\res
[crunch] To destination dir: C:\Users\clint.vought\Desktop\Unreal Engine 4\Training\FirstPersonShooter\Intermediate\Android\APK\JavaLibs\downloader_library\bin\res
[crunch] Crunched 0 PNG files to update cache

-package-resources:
[echo] Library project: do not package resources…

-package:
[echo] Library project: do not package apk…

-post-package:

-do-debug:
[echo] Library project: do not create apk…
[propertyfile] Updating property file: C:\Users\clint.vought\Desktop\Unreal Engine 4\Training\FirstPersonShooter\Intermediate\Android\APK\JavaLibs\downloader_library\bin\build.prop
[propertyfile] Updating property file: C:\Users\clint.vought\Desktop\Unreal Engine 4\Training\FirstPersonShooter\Intermediate\Android\APK\JavaLibs\downloader_library\bin\build.prop
[propertyfile] Updating property file: C:\Users\clint.vought\Desktop\Unreal Engine 4\Training\FirstPersonShooter\Intermediate\Android\APK\JavaLibs\downloader_library\bin\build.prop
[propertyfile] Updating property file: C:\Users\clint.vought\Desktop\Unreal Engine 4\Training\FirstPersonShooter\Intermediate\Android\APK\JavaLibs\downloader_library\bin\build.prop

-post-build:

debug:

-code-gen:
[mergemanifest] Found Deleted Target File
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
[echo] Handling aidl files…
[aidl] Found 1 AIDL files.
[aidl] Compiling 1 AIDL files.
[aidl] aidl.exe E 14472 15748 io_delegate.cpp:102] Error while creating directories: Invalid argument

I believe this is a bug in the build tool. I see you are on 24.0.0 rc2. I’m using 23.0.3. Did you install the Preview Channel Build-tools? Uninstall them and use only the proper versions. Android SDK Build-tools 23.0.3 is the latest. Run “SDK Manager.exe” in NVPACK/android-sdk-windows.

OK so I did as you suggested and uninstalled the Preview Channel Build tools and have the 23.0.3 installed. My build still failed but I received a different error. That may be a fail but I think its a fail in the right direction. If you have a chance could you tell me what you think about the error below?

MainFrameActions: Packaging (Android (ETC2)): [javac] symbol: variable HttpClientParams
MainFrameActions: Packaging (Android (ETC2)): [javac] location: class AndroidHttpClient
MainFrameActions: Packaging (Android (ETC2)): [javac] Note: Some input files use or override a deprecated API.
MainFrameActions: Packaging (Android (ETC2)): [javac] Note: Recompile with -Xlint:deprecation for details.
MainFrameActions: Packaging (Android (ETC2)): [javac] 100 errors
MainFrameActions: Packaging (Android (ETC2)): BUILD FAILED
MainFrameActions: Packaging (Android (ETC2)): C:\NVPACK\android-sdk-windows ools\ant\build.xml:716: The following error occurred while executing this line:
MainFrameActions: Packaging (Android (ETC2)): C:\NVPACK\android-sdk-windows ools\ant\build.xml:730: Compile failed; see the compiler error output for details.
MainFrameActions: Packaging (Android (ETC2)): Total time: 7 seconds
MainFrameActions: Packaging (Android (ETC2)): Program.Main: ERROR: AutomationTool terminated with exception: ERROR: cmd.exe failed with args /c “C:/NVPACK/apache-ant-1.8.2/bin/ant.bat” debug
MainFrameActions: Packaging (Android (ETC2)): Program.Main: AutomationTool exiting with ExitCode=1 (Error_Unknown)
MainFrameActions: Packaging (Android (ETC2)): Domain_ProcessExit
MainFrameActions: Packaging (Android (ETC2)): copying UAT log files…
MainFrameActions: Packaging (Android (ETC2)): BUILD FAILED
PackagingResults:Error: Error Unknown Error

This may be due to using the wrong SDK API level setting. Did you set it to someone higher than android-22? android-23, android-24, and latest currently will not work if you have these versions of the SDK installed. Try setting it to “matchndk” instead in Android SDK project settings.