Packaging Android from Mac OSX - nope

I’ve been developing on PC (but on OSX now for the tl;dr-inclined folks) for awhile now. I’ve been with UE4 since 4.0; I am very familiar by now with packaging to Android and iOS and the setup involved, dev or distribution. I’ve always used an old Macbook Pro for building to iOS, as cumbersome as that is (it barely opened the engine).

So I’ve now switched to a Mac Pro for all dev work and building to Android/iOS. All-in-one, baby.

But, :frowning:

After installing Java and AndroidWorks, I get the wonderful “You are missing some required components for Android game creation.” message. I made sure to follow the Quick Start guide like 3 extra times and did a bunch of uninstalling/reinstalling/restarting/crying to no avail.

Running 4.10.4. Built to iOS just fine. Editor recognizes Android devices in Project Launcher but obviously fails to build there.

help plz

Hello,

I have tested packaging an android project on one of our Macs, and it finished successfully with no errors.

  • What OS are you running?
  • Could you briefly run me through the process that you are using to set up for Android development on your Mac?
  • El Capitan
  • Exactly the Quick Start guide.

To recite it off the top of my head:

  • Install Java 7 & 8. And most recent Java. All the Java.
  • Install AndroidWorks via what’s included in the Engine files.

Are you getting this error message in your output log? If so, could you please provide the full output log?

There is no output log. As soon as I hit package, it tells me I don’t have the required components, as if I didn’t have AndroidWorks installed.

Should I just try reinstalling the engine? Seems like an error that shouldn’t be happening if you guys have no problems with this.

Thank you for the additional information. I haven’t run across this error before myself, but I will look into it to determine a solution for you.

In the meantime, you can definitely try a fresh installation to see if that helps. Let me know the results.

Fresh installation did nothing. Should I try actually purging all UE4 and AndroidWorks files and starting from scratch? Also, does it matter that the project has code as far as packaging to Android from OSX is concerned?

It’s worth a shot to get rid of all the Android-related files and run through the setup again just to ensure that something didn’t go wrong when it was set up the first time.

Did you try to build the code project for Development/Shipping Android before attempting to package?

Hello,

I am marking this topic as resolved for tracking purposes, as we have not heard from you in a few days. If this issue persists, feel free to respond to this thread. For any new issues, please create a new Answerhub topic.

Have a great day

not so fast

When doing a normal build from the Project Launcher, it immediately fails with:

mono: UnrealBuildTool Exception: ERROR: GetBuildPlatform: No BuildPlatform found for Android

I’m gonna see if updating to 4.11.2 does anything.

Turns out the solution was specific to my situation, so not sure if it’ll help many people. But here it is:

I’m using Photon for realtime networking on mobile. For UE4.10+ and Photon 4+ to work together, I needed to use an Android NDK that pre-dated the current version of r11c that gets installed when setting up AndroidWorks. When using r10b or r10e (the easiest ones to find for Mac for some reason), it messes up. Using r10d, however, solved the problem and allowed me to build for Android on OSX. That version was “just right”, and seems to allow building to Android from both Windows and OS X.

If you download r10d for Mac from here: http://pnsurez.blogspot.com/2015/07/download-android-ndk-tools.html and get a finicky .bin file, just remove the extension in the name and click the resulting .exe. It’ll extract the files into your user folder. Move it over to NVPACK (for organizational purposes), and point to it in your NDK selection within Project Settings > AndroidSDK.

Hit the same issue. All the answers so far have been specific to individual solutions, so I had to track down a little further. Spreading the steps around for later searchers.

The sdk setup validation is done via UnrealBuildTool, executed from TargetPlatformManagerModule.cpp :: SetupSDKStatus()

You can iterate a little faster than through the editor: run /Engine/Binaries/DotNET/UnrealBuildTool.exe -validateplatform -platforms=Android

you can add -verbose, but it doesn’t actually print anything useful.

In your IDE, set UnrealBuildTool as the startup project, set the parameters above for launch, and add a breakpoint in UEBuildAndroid.cs :: HasAnySDK()

step through, and you can see what values are actually being used for the validation step, and what it is expecting / what it can’t find.

Epic: it would be nice if -verbose actually printed something useful in this situation.