Announcement

Collapse
No announcement yet.

Windows SDK version issue deploying for Android

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

    Windows SDK version issue deploying for Android

    I am trying to package my game for android, but I seem to have an issue with the Windows SDK. My project has the "Sun Position Calculator" plugin enabled, and it triggers a compile of some code that seems to require the Windows SDK (although I don't understand why this happens when building for Android). The problem is that this compile picks an old version of the Windows SDK (10.0.10240.0), resulting in a "vcruntime.h file not found" error.

    When deploying for windows, the correct Windows SDK version 10.0.18362.0 is used. I use Visual Studio 2019. I already tried re-installing Unreal Engine, but that did not help. I was searching for a way to explicitly set the windows sdk to use, but could not find it. The only setting I found for the BuildConfiguration.xml file only applies to building on Windows. I managed to make it work by deleting the old windows SDKs, forcing it to pick the latest one, but this is not a good solution since other projects need older SDks.

    Below you can find the log output of the build tool. Does anyone have any suggestion how to fix the Windows SDK version for Android?

    Code:
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): TestAndroid.uproject requires a temporary target.cs to be generated (SunPosition plugin is enabled)
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): ********** BUILD COMMAND STARTED **********
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): Running: C:\Program Files\Epic Games\UE_4.24\Engine\Binaries\DotNET\UnrealBuildTool.exe TestAndroid Android Shipping -Project="C:\Users\me\Documents\Unreal Projects\TestAndroid\TestAndroid.uproject" "C:\Users\me\Documents\Unreal Projects\TestAndroid\TestAndroid.uproject
    " -NoUBTMakefiles -remoteini="C:\Users\me\Documents\Unreal Projects\TestAndroid" -skipdeploy -Manifest="C:\Users\me\Documents\Unreal Projects\TestAndroid\Intermediate\Build\Manifest.xml" -NoHotReload -log="C:\Users\me\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.24\UBT-TestAndroid-Android-Sh
    ipping.txt"
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): PLATFORM_ANDROID_NDK_VERSION = 140200
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): NDK toolchain: r14b, NDK version: 19, GccVersion: 4.9, ClangVersion: 3.8.275480
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): Parsing headers for TestAndroid
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): Running UnrealHeaderTool "C:\Users\me\Documents\Unreal Projects\TestAndroid\TestAndroid.uproject" "C:\Users\me\Documents\Unreal Projects\TestAndroid\Intermediate\Build\Android\TestAndroid\Shipping\TestAndroid.uhtmanifest" -LogCmds="loginit warning, logexit warning, l
    ogdatabase error" -Unattended -WarningsAsErrors -installed
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): Reflection code generated for TestAndroid in 7.3400989 seconds
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): Compiling Native code with NDK API 'android-19'
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): Writing manifest to C:\Users\me\Documents\Unreal Projects\TestAndroid\Intermediate\Build\Manifest.xml
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): Building TestAndroid...
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): [Upgrade]
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): [Upgrade] Using backward-compatible build settings. The latest version of UE4 sets the following values by default, which may require code changes:
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): [Upgrade] bLegacyPublicIncludePaths = false => Omits subfolders from public include paths to reduce compiler command line length. (Previously: true).
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): [Upgrade] ShadowVariableWarningLevel = WarningLevel.Error => Treats shadowed variable warnings as errors. (Previously: WarningLevel.Warning).
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): [Upgrade] PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs => Set in build.cs files to enables IWYU-style PCH model. See https://docs.unrealengine.com/en-US/Programming/BuildTools/UnrealBuildTool/IWYU/index.html. (Previously: PCHUsageMode.UseSharedPCHs).
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): [Upgrade] Suppress this message by setting 'DefaultBuildSettings = BuildSettingsVersion.V2;' in TestAndroid.Target.cs, and explicitly overriding settings that differ from the new defaults.
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): [Upgrade]
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): Building 4 actions with 4 processes...
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): [1/4] SharedPCH.Core.h [armv7-es2]
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): In file included from C:/Users/me/Documents/Unreal Projects/TestAndroid/Intermediate/Build/Android/TestAndroid/Shipping/Core/SharedPCH.Core.h:69:
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): In file included from C:/Program Files/Epic Games/UE_4.24/Engine/Source/Runtime/Core/Public/CoreSharedPCH.h:7:
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): In file included from C:/Program Files/Epic Games/UE_4.24/Engine/Source/Runtime/Core/Public/Misc/Exec.h:6:
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): In file included from C:/Program Files/Epic Games/UE_4.24/Engine/Source/Runtime/Core/Public\Misc/AssertionMacros.h:6:
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): In file included from C:/Program Files/Epic Games/UE_4.24/Engine/Source/Runtime/Core/Public\HAL/PlatformMisc.h:5:
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): In file included from C:/Program Files/Epic Games/UE_4.24/Engine/Source/Runtime/Core/Public\GenericPlatform/GenericPlatformMisc.h:7:
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): In file included from C:/Program Files/Epic Games/UE_4.24/Engine/Source/Runtime/Core/Public\HAL/PlatformCrt.h:6:
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\wchar.h:13:
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\corecrt.h(10,10): fatal error: 'vcruntime.h' file not found
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): #include <vcruntime.h>
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)):              ^
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): 1 error generated.

    #2
    I seem to have found the origin of the issue. Clang, used for compiling the plugin code, used an invalid include path set through the CPLUS_INCLUDE_PATH environment variable. After removing this this environment variable, project deployment seems to go fine.

    Comment

    Working...
    X