Okay, before you guys start asking me the super-obvious questions, I’ve got 7 years of developing for Android under my belt. So, yes… I:
Have developer mode enabled
Have Unknown Sources enabled
Have USB Debugging enabled
Have working USB drivers for my device installed and working properly
Have the SDK installed from the NVPACK installed
Have all environment variables pointing to the correct folders for both USER and SYSTEM: ANDROID_HOME, ANDROID_NDK_ROOT, NDK_ROOT, NDKROOT, ANT_HOME, GRADLE_HOME, JAVA_HOME, NVPACK_ROOT, NVPACK_NDK_VERSION
Have authorized the computer for debugging with my device
I can build and deploy to my device perfectly fine in Eclipse, Android Studio, and Unity3D with no problems at all. My device also shows in ADB as a listed device.
My device also shows in the UE4 Editor under Project Launcher and Device Manager.
The project also is set to have Android as a Supported Platform
Under the Epic Games Launcher, both 4.12.5 and 4.13 under the dropdown -> Options have Android checked and installed under the Target Platforms list.
Android SDK paths are set correctly under Project Settings in the UE4 Editor as well.
And finally, yes… I have triple/quadruple-checked the environment variables, even after doing a clean uninstall and reinstall of ALL tools, programs, and associated SDKs - and rebooted many times.
This is on Windows 10 against UE4 Editor 4.12.5 and 4.13 (launcher, not source-built) to a Galaxy S6 phone with Android 6.0.1. Is it not supported at all with launcher version, or did support break somewhere? I’ve done everything word-for-word to the support guidelines and it doesn’t work. This is the error when trying to build:
It seems to have no cognizance why it’s failing, and googling around and asking in #unrealengine on freenode isn’t warranting any more info on this.
I hope someone can help me figure out why it’s unable to build at all.
Sorry for the necro here but I’ve run into a very similar issue and this is the closest thing I’ve found in regards to it (spent about 2 days researching). I get the same error however only when I execute the build through Jenkins. When I run UAT through CMD or cook in the editor it works fine.
Something I found that was interesting was that since Jenkins is a service it might not have permissions. However the fail is happening in the UnrealBuildTool and not in Jenkins. What is the difference between running UnrealBuildTool via Jenkins vs running it via CMD?
I found out the reason why the building through Jenkins always failed. I suppose we all installed android dev environment with AndroidCodeWork.
And this app will setup user environment variables FOR CURRENT USER, not System Variables.
Jenkins use System Variables, so we continuously failed .
The solution is quite easy, just add every env variables to System Variables manually.
Now, this is for Unreal 4.21, so I installed the Codeworks that came with the engine source, 7u1. This contains NDK r14b.
But for whatever reason, the engine expects to be finding NDK r12b in the NVPACK directory. Downloading r12b and putting it in the NVPACK folder solved my issue.
Was perhaps too hasty in claiming that it had worked. It now fails because it cannot find the licenses folder in the SDK directory. Now I remember accepting licenses in the Codeworks installer, yet there’s no “licenses” folder.
I already had another Android SDK installed somewhere else on my machine, so I ran the SDKManager --licenses command there. It created a bunch of files in its licenses folder, so I copied that licenses folder to the NVPACK android sdk directory. It finally worked after that.
This is really useful. When using a script to build a project, UE4.21 does not seem to be able to use NDK r14b. An error of “No BuildPlatform found for Android” will appear, because UE4 does not find NDK. I changed to r12b and it succeeded.
These comments are really useful but none have worked for me yet: Jenkins building Android Unreal Game on a Virtual Machine.Anyone got any tutorials? I’ve scoured the internet but none work yet…
Many thanks.
I also face this issue, its because the action rpg sample requires ndk r14b, by default codeworks from nvidia installs r12b and therefore i need to exchange ndk. I setup in the project-settings but, now NDKROOT still contains old path, and i dont know where to change it.
**cokeisnotbest **answer worked for me. In windows environment variables had to copy every variable connected to nvpack, ndk or android from USER to SYSTEM variables.
Keep in mind that it started to work for me only after rebooting the system.