Download

Is there a trick to getting UE4 packaged for android devices?

Is there a trick to getting UE4 packaged for android devices?, I have installed Java, the Android SDK, even turned on my usb debugging under developer tools, yet the ADB devices don’t seem to run under Cmd.
Mainly been trying to search for answers, not much. Was even using this with not much luck:
https://docs.unrealengine.com/…/Android/Gettin…/1/index.html

I’ve been trying to go through the recommend tutorials and not having much luck, even Googled around to say if there’s any reason why my PC isn’t showing the devices as ADB under Cmd. I’ve already installed the drivers for the devices and installed both Java, Android sdk. At the moment I’m mainly prototyping my game that was mainly focused on PC only but I was testing to see if a port would work well on a table or mobile devices. At the moment I’ve done everything that I can think of at the moment but not much luck figuring it all out.

You also need the ndk in addition to the sdk if you want to target andoid with ue4. I recommend the Tegra dnroid development pack as it includes everything you need to get started with android development. It worked for me right out of the box and I think it is even recommended by nvidia and/or epic to use it when targeting android with ue4. As it also contains some awesome extra tools like a graphics debugger if you got a tegra gpu.

I did the installs but when I did a search for ADB devices this time on cmd it now says “unauthorised”, yes I’m the administrator, I unlocked my device when doing the search.

did you also run the cmd as admin?

Hi Kuhmaus,

Do you have debugging enabled on the device you’re testing?

Yes tried that, seems it oddly disabled itself after I enabled it.

Yes tried that too, with developer options turned on.

It seems UE4 always says "“You are missing some required components for Android game creation. Even if you have installed th eAndroid SDK already, there may be some missing components or environment variables.”, I’ve done everything that I can think of.

Hi ronnie, Please check the follow:

Open the Editor and go to the
**Project Settings -> Plataforms -> Android SDK **

Check if the path is “complete”, for example if say “c:/NVPACK” the engine say that error.
Write the complete path:

C:/NVPACK/android-sdk-windows
C:/NVPACK/android-ndk-r9c
C:/NVPACK/apache-ant-1.8.2
C:/NVPACK/jdk1.6.0_45

I hope help you.

Well the last one seems to mentioned elsewhere by folder while it does seem that I have no “/apache-ant-1.8.2” but did a few tweaks and seems to show up, will need to test further.

So I did a simple launch from my Nexus 7, got a “PackagingResults:Error: Error Launch failed! Invalid Arguments”, just to be clear all I didn’t do anything major for my games design. I was mainly testing a FBX mesh level that I used with no added programming with 3rd person character example as a prototype until I make my own changes later.

Noticed after checking the logs:

"ogPlayLevel: UnrealBuildTool: BUILD FAILED
LogPlayLevel: UnrealBuildTool: C:\NVPACK\android-sdk-windows ools\ant\build.xml:601: The following error occurred while executing this line:
LogPlayLevel: UnrealBuildTool: C:\NVPACK\android-sdk-windows ools\ant\build.xml:720: The following error occurred while executing this line:
LogPlayLevel: UnrealBuildTool: C:\NVPACK\android-sdk-windows ools\ant\build.xml:734: Unable to find a javac compiler;
LogPlayLevel: UnrealBuildTool: com.sun.tools.javac.Main is not on the classpath.
LogPlayLevel: UnrealBuildTool: Perhaps JAVA_HOME does not point to the JDK.
LogPlayLevel: UnrealBuildTool: It is currently set to “C:\Program Files (x86)\Java\jre1.8.0_45"”

My ant file is marked oddly, I’ve tried to match the maps mentioned, even with the different versions of the files seemingly being installed.

Not sure how but I somehow got it to launch.

Well I guess you wanted to say Hi Ronnie as it works fine for me on android :wink:

Well I guess you wanted to say Hi Ronnie as it works fine for me on android :wink:

@Ronnie I think I see your problem there. your JAVA_HOME environemnet variable is pointing to a jre which is not what you want. You want it to point to your jdk. Thats the java development kit that comes with your NVPACK if you didnt uncheck that on install. So make your JAVA_HOME point to the jdk not jre

I did! Sorry about that.

Hi Ronnie42,

For reference, here is the documentation on how you should set up your environment variables. Good luck!