Announcement

Collapse
No announcement yet.

Unable to build to Android at all - "ERROR: GetBuildPlatform: No BuildPlatform found for Android"

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Unable to build to Android at all - "ERROR: GetBuildPlatform: No BuildPlatform found for Android"

    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:
    1. Have developer mode enabled
    2. Have Unknown Sources enabled
    3. Have USB Debugging enabled
    4. Have working USB drivers for my device installed and working properly
    5. Have the SDK installed from the NVPACK installed
    6. 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
    7. 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:

    Project.Cook: Waiting a few seconds for the server to start...
    Project.Cook: ********** COOK COMMAND COMPLETED **********
    Project.CopyBuildToStagingDirectory: ********** STAGE COMMAND STARTED **********
    Program.Main: ERROR: AutomationTool terminated with exception: ERROR: GetBuildPlatform: No BuildPlatform found for Android
    Program.Main: AutomationTool exiting with ExitCode=1 (Error_Unknown)
    BUILD FAILED
    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.

    #2
    I've usually seen this if NDKROOT isn't set up, or the NDK is missing a required toolchains/llvm (3.1, 3.3, 3.5, 3.6, or just llvm for ndk11c and up).

    The checks are done in UEBuildAndroid.cs in RegisterBuildPlatforms(). Do you see this message in the log? "Registering for Android"?

    Comment


      #3
      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?

      Thanks in advance!

      Comment


        #4
        Originally posted by Zarrabim View Post
        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?

        Thanks in advance!

        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.

        Comment

        Working...
        X