Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

[Closed] Can build on 4.11 but not 4.12 (for Android)

cloned the project, I get an unknown build error in 4.12 but it packages just fine in 4.11.

Product Version: UE 4.12
more ▼

asked Jun 06 '16 at 06:49 PM in Packaging & Deployment

avatar image

Spectral Ink
224 12 15 23

avatar image saeedc Jun 06 '16 at 09:34 PM


if you send your logs people can help you better.

avatar image Spectral Ink Jun 07 '16 at 02:09 AM

from what I've read in other forums on the topic, it said when you see errors like these its a vague android error that isn't very helpful or telling. But here's some excerpts:

MainFrameActions: Packaging (Android (All)): UnrealBuildTool: MainFrameActions: Packaging (Android (All)): UnrealBuildTool: BUILD FAILED MainFrameActions: Packaging (Android (All)): UnrealBuildTool: D:\NVPACK\android-sdk-windows\tools\ant\build.xml:892: The following error occurred while executing this line: MainFrameActions: Packaging (Android (All)): UnrealBuildTool: D:\NVPACK\android-sdk-windows\tools\ant\build.xml:894: The following error occurred while executing this line: MainFrameActions: Packaging (Android (All)): UnrealBuildTool: D:\NVPACK\android-sdk-windows\tools\ant\build.xml:906: The following error occurred while executing this line: MainFrameActions: Packaging (Android (All)): UnrealBuildTool: D:\NVPACK\android-sdk-windows\tools\ant\build.xml:283: null returned: 2


MainFrameActions: Packaging (Android (All)): Program.Main: AutomationTool exiting with ExitCode=5 (5) MainFrameActions: Packaging (Android (All)): Domain_ProcessExit MainFrameActions: Packaging (Android (All)): copying UAT log files... MainFrameActions: Packaging (Android (All)): BUILD FAILED PackagingResults:Error: Error Unknown Error

avatar image Spectral Ink Jun 08 '16 at 05:00 AM

just tried 4.12.1 - same result

avatar image Samantha Sutton ♦♦ STAFF Jun 09 '16 at 07:31 PM

Spectral Ink,

I need to see your full error logs as a .txt file attached with your next reply. I'd also like to have a screenshot of your Android SDK settings provided. Please also check and see whether or not 4.12.2 has fixed this problem.

Looking forward to hearing back from you, thanks! :)

avatar image Spectral Ink Jun 11 '16 at 05:56 AM

4.12.2 has not fixed the problem,link text

output log.txt (330.7 kB)
avatar image Samantha Sutton ♦♦ STAFF Jun 13 '16 at 04:21 PM

Spectral Ink,

  • Did you install the SDKs through the Android SDK Manager?

  • What does your Android SDK (within UE4 > Project Settings) look like?

Here is a link which may help you: https://answers.unrealengine.com/questions/434452/android-build-failed-8.html

avatar image Spectral Ink Jun 16 '16 at 07:20 AM

I installed through the androidworks shipped with. Tried with the Android SDK manager as well but it screwed everything up, so I uninstalled and re-installed with what ships with the engine. That at least got 4.11 working.

Settings are the same as in 4.11, which work.alt text

alt text

settings.jpg (216.5 kB)
avatar image Spectral Ink Jun 17 '16 at 07:45 AM

failed on 4.12.3 as well

avatar image Zarkopafilis Jun 17 '16 at 09:17 AM

4.11 Uses AndroidWorks 4.12 Uses CodeWorks

Please run the installer/sdk manager provided with 4.12.* versions of the engine. Be sure to tick automatically resolve conflicts. After that, set your settings to point to the new codeworks sdk/ndk location.

avatar image Spectral Ink Jun 17 '16 at 06:53 PM

yeah tried that. Just to be sure, I tried it again. At least it explains why, when I had originally updated the android sdk it broke 4.11. I have a simple android test, no extra plug-ins or anything, and it still fails to compile.

Shouldn't you all wait to hear if the answer works before declaring it resolved?

avatar image Spectral Ink Jun 19 '16 at 01:11 AM

this is not resolved

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

The question has been closed Jul 14 '16 at 08:34 PM by Steve Hardister for the following reason:

The initial question is answered; Requested user start new thread for problems with their custom project

1 answer: sort voted first

Hi Spectral Ink,

I cannot verify that there is an issue Packaging to Android from UE4.12 using the following repro steps.

  1. In UE4.12 create a new Mobile/Tablet game, Third Person Blueprint, No Starter Content: Call it something like "Android Test" and close editor

  2. Navigate to your Android Works folder in your UE4 install directory and Launch "CodeWorksforAndroid"

  3. AndroidSetting1

  4. AndroidSetting2

  5. AndroidSetting3

  6. After installing CodeWorksforAndroid be sure to link directories correctly in Project Settings to NVPACK directories:

  7. AndroidSetting4

  8. In Project Settings>Platform>Android, make sure APKPackaging and GooglePlayServices are writable

  9. Open previously created Third Person Mobile game

  10. Package for Android (All) to a blank folder on the Desktop (Make sure Project name has no unusual characters, spaces, etc.)

  11. Altenatively: Launch Straight onto device to check for Errors in your project

  12. I was able to Launch Straight to device and package and use the installer to install package to Android device: Samsung Galaxy S5 following these repro steps.

CONCLUSION: No bug present preventing UE4.12.3 projects from packaging to an Android device.

more ▼

answered Jun 23 '16 at 07:30 PM

avatar image Steve Hardister ♦♦ STAFF Jun 23 '16 at 07:32 PM

The following error points to a problem with your "apache-ant-" link... perhaps it did not get updated or is linked to the old one for UE4.11:

ant error

ant_error.png (19.2 kB)
avatar image Spectral Ink Jun 24 '16 at 12:25 AM

I had done all that, but I'll go through it all again tonight to see if I missed something and let you know

avatar image Spectral Ink Jun 24 '16 at 04:57 AM

went through all those steps. NVidia tegra wouldn't install. Now it wont even try to package, just get the window saying my android development setup is wrong. Can still package in 4.11 though after I reset my sdk directories.

And here's a stupid question - why are those settings not editor specific? If I set it correctly for 4.12 I break 4.11 until I reset them.

avatar image Spectral Ink Jun 24 '16 at 09:08 AM

tried installing it on another machine. Was trying to install it on a windows 7 machine, so I tried a windows 10 machine.

Installed the android stuff, and I go tan error when I tried to build. Then I remembered I didn't set wish version to install, so I re-installed it and now it won't try to build at all.

avatar image Steve Hardister ♦♦ STAFF Jun 24 '16 at 07:17 PM

I went through the above steps on a Windows 7 Machine, just so we're comparing "apples to apples." Nvidia Tegra must install properly, not optional. You will likely have to uninstall it from your programs using Windows Control Panel, before attempting to reinstall.

I do not see it posted, so here is the official documentation that I followed (Be sure to follow these in order replacing Android Works with Code Works):

Install the Android SDK

If you set your SDK in project settings for 1 project in UE4.11 and set your SDK to different directories in a different project in UE4.12, the settings should remain for each, without "breaking" Is this not the case?

avatar image Spectral Ink Jun 24 '16 at 07:33 PM

I've never gotten NVidia Tegra to install and it worked for all previous versions of Unreal. Nvidia Tegra wont install because I do not have Visual Studio Professional, it apparently doesn't like Community.

So what you are saying is I cannot build to Android on PC unless I purchase additional software? Or stay in 4.11?

avatar image Vannon Jun 25 '16 at 02:13 PM

Download Nsight Tegra manually (latest version), the version provided by AndroidWorks is not compatible with vs2015 (Community or not).

avatar image Spectral Ink Jun 25 '16 at 09:52 PM

tried that.Thanks for the suggestion, but still getting the pop-up window saying its not configured for Android. will try re-installing android sdk again

avatar image Steve Hardister ♦♦ STAFF Jun 27 '16 at 08:37 PM

You do not have to purchase additional software to build on Android...Are you using Visual Studio 2015 Community?

avatar image Spectral Ink Jun 29 '16 at 06:26 PM

Yes, using community.

Updated to latest version of unreal. installed Tegra manually. Uninstalled and re-installed codeworks. Build still fails.

avatar image Steve Hardister ♦♦ STAFF Jun 29 '16 at 08:13 PM

Please post a screen shot of the error message you're getting and/or the Contents of the Output Log cut n pasted into a text document.

avatar image Spectral Ink Jun 29 '16 at 08:38 PM

here's the loglink text

log.txt (6.4 kB)
avatar image Steve Hardister ♦♦ STAFF Jun 29 '16 at 09:16 PM

In the latest log, the error is: "No modules found to build." Try adding an empty C++ Class to your project and package for Android. This typically resolves this error. -if it does not, post a new log. Thanks.

avatar image Spectral Ink Jun 29 '16 at 09:29 PM

well, it's no longer a blueprint-only project, which isn't what I wanted but because I'm using a plug-in I had to do anyway. It at least tried this time, but it still failed. link text

from what I can read, its trying to find a debug file [My Project Name]-debug.apk even if it's set to shipping. I never had one in 4.11

log.txt (364.7 kB)
avatar image Steve Hardister ♦♦ STAFF Jun 30 '16 at 01:42 PM

What plug-in are you using?

avatar image Spectral Ink Jun 30 '16 at 09:16 PM

the Universal Ads from GameDNA, but I have a plain project that also isn't compiling

avatar image Steve Hardister ♦♦ STAFF Jul 07 '16 at 08:20 PM

Please locate and send this log referenced in your package log:

UnrealBuildTool-2016.06 .29-14.19.13.txt

Also, please send the packaging log from the plain project for comparison.

Finally, check out the answer to these posts and make sure "Location of ANT" is set correctly:

ERROR: Unable to find ant.bat !!!

ERROR: cmd.exe failed with args /c "C:/apache-ant-1.8.2/bin/ant.bat

avatar image Spectral Ink Jul 09 '16 at 11:22 PM

link text

here's the log

avatar image Spectral Ink Jul 09 '16 at 11:27 PM

link text Here's the log.

Tried it on the latest version, still fails.

Those links aren't relevant to my case. The first, he was setting his path wrong. I'm setting it correctly. Same way I am setting it in 4.11. The second talks about changing the environmental variables. Since I'm setting them in the project settings, doesn't that override what's in the environmental variables?

avatar image Steve Hardister ♦♦ STAFF Jul 12 '16 at 06:51 PM

Putting your custom project aside for the moment to address the initial question of whether you can build for Android both in UE4.11 and UE4.12, please follow these steps:

  1. Open a new Third Person Blueprint project in UE4.11.2: Mobile/Tablet, Maximum Quality, No Starter Content

  2. Under Project Settings: Android: APK Packaging: Make sure it is configured for Android

  3. Under Project Settings: Android: Google Play Services: Make sure it is configured for Android

  4. With Android device plugged in, Launch on Android Device

  5. Repeat steps 1-4 in a blank Third Person Blueprint

Are you currently able to build in both UE4.11 and UE4.12?

avatar image Spectral Ink Jul 12 '16 at 07:17 PM

Which I have tried over and over, on different machines, on different versions of windows, all with no effect.

And again, I've built in 4.10 and 4.11, cannot build to 4.12 in Android. Can build to ios when on a mac, but not to android.

avatar image Steve Hardister ♦♦ STAFF Jul 12 '16 at 07:32 PM

Okay, I didn't know if we had tried with a blank Third Person project; Are your previously posted logs from a Blank Third Person project? If not, please post a copy of those output logs to eliminate all extraneous information. Thanks.

avatar image Spectral Ink Jul 13 '16 at 10:00 PM

was able to get my test one compiling for development without errors. Cannot get my real project to compile in either distribution or dev.

Might be related to the plug-in, since I can now get a blank project compiling, now that we're ruled out the other issues.

avatar image Steve Hardister ♦♦ STAFF Jul 14 '16 at 08:32 PM

Since this is getting very long and we have established that you are able to package to the Android in UE4.12.5 (The initially reported problem) I am closing this thread.

Please start a new thread for your specific issue packaging for your custom project. -Thanks.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question