Any way to speed up Launch times on Android?

Every time I launch my android project it takes 10-20 minutes (even if absolutely nothing has changed). Most of that time is spent compiling and setting stuff up.that it seems it should only do once

At tips for optimizing the launch process and getting it down to a managable time?

e.g.:



LogPlayLevel: UnrealBuildTool: ====9/1/2017 4:48:37 PM====PREPARING TO MAKE APK=================================================================
LogPlayLevel: UnrealBuildTool: Building Java with SDK API level 'android-24'
LogPlayLevel: UnrealBuildTool:
LogPlayLevel: UnrealBuildTool: Patching ant.bat to work around commandline length limit (using unused drive letter Z:)
LogPlayLevel: UnrealBuildTool: Using package name: 'com.Derek.Test'
.
.
LogPlayLevel: UnrealBuildTool: [1/4] clang++.exe UELinkerExceptions.cpp [armv7-es2]
LogPlayLevel: UnrealBuildTool: [3/4] clang++.exe android_native_app_glue.c [armv7-es2]
LogPlayLevel: UnrealBuildTool: [2/4] clang++.exe cpu-features-patched.c [armv7-es2]
LogPlayLevel: UnrealBuildTool: [4/4] clang++.exe TestPrototype-armv7-es2.so
.
.
LogPlayLevel: UnrealBuildTool: Updating project.properties, local.properties, and build.xml for play-services-ads-lite-9.2.0...
LogPlayLevel: UnrealBuildTool: Updating project.properties, local.properties, and build.xml for play-services-auth-9.2.0...
LogPlayLevel: UnrealBuildTool: Updating project.properties, local.properties, and build.xml for play-services-auth-base-9.2.0..

PlayLevel: CommandUtils.Run: Run: e:\NVPACK\android-sdk-windows\platform-tools\adb.exe -s 2ce3820b  shell getprop ro.product.cpu.abi
LogPlayLevel: CommandUtils.Run: Run: Took 0.1421002s to run adb.exe, ExitCode=0
LogPlayLevel: CommandUtils.Run: Run: e:\NVPACK\android-sdk-windows\platform-tools\adb.exe -s 2ce3820b shell dumpsys SurfaceFlinger
LogPlayLevel: CommandUtils.Run: Run: Took 0.1671191s to run adb.exe, ExitCode=0
LogPlayLevel: AndroidPlatform.CollectPluginDataPaths: AndroidPlugin: Plugins\Runtime\AndroidPermission\Source\AndroidPermission\AndroidPermission_APL.xml
LogPlayLevel: AndroidPlatform.CollectPluginDataPaths: AndroidPlugin: Plugins\Runtime\GearVR\Source\GearVR\GearVR_APL.xml
LogPlayLevel: AndroidPlatform.CollectPluginDataPaths: AndroidPlugin: Plugins\Runtime\GearVR\Source\GearVRController\GearVRController_APL.xml
LogPlayLevel: AndroidPlatform.CollectPluginDataPaths: AndroidPlugin: Plugins\Runtime\GoogleCloudMessaging\Source\GoogleCloudMessaging\GoogleCloudMessaging_UPL.xml
LogPlayLevel: AndroidPlatform.CollectPluginDataPaths: AndroidPlugin: Source\Runtime\Online\Voice\AndroidVoiceImpl_UPL.xml
LogPlayLevel: UnrealPluginLanguage..ctor:
.
LogPlayLevel: UEDeployAndroid.RunCommandLineProgramWithException: Updating project.properties, local.properties, and build.xml for support-core-ui-25.0.0...
LogPlayLevel: UEDeployAndroid.RunCommandLineProgramWithException: Updating project.properties, local.properties, and build.xml for support-core-utils-25.0.0...
LogPlayLevel: UEDeployAndroid.RunCommandLineProgramWithException: Updating project.properties, local.properties, and build.xml for support-fragment-25.0.0...
.
.
1061\TestPrototype\Intermediate\Android\APK\assets\oculussig_cc4930ec
LogPlayLevel: UnrealPluginLanguage.DeleteFiles:
LogPlayLevel: Deleted file E:\Perforce\root\TestPrototype\Intermediate\Android\APK\assets\oculussig_ce051715135b0f0b02
LogPlayLevel: UnrealPluginLanguage.DeleteFiles:
LogPlayLevel: Deleted file E:\Perforce\root\TestPrototype\Intermediate\Android\APK\assets\oculussig_dfc388db
LogPlayLevel: UEDeployAndroid.MakeApk:
LogPlayLevel: ====9/1/2017 4:53:21 PM====PERFORMING FINAL APK PACKAGE OPERATION================================================
LogPlayLevel: UEDeployAndroid.RunCommandLineProgramAndReturnResult: Making .apk with Ant... (note: it's safe to ignore javac obsolete warnings)
LogPlayLevel:     [javac] Note: Some input files use or override a deprecated API.
LogPlayLevel:     [javac] Note: Recompile with -Xlint:deprecation for details.
LogPlayLevel: BUILD SUCCESSFUL
LogPlayLevel: Total time: 2 minutes 33 seconds
LogPlayLevel: AndroidPlatform.GetAaptPath: Using this aapt: e:\NVPACK\android-sdk-windows\build-tools\android-7.1.1\aapt.exe
LogPlayLevel: CommandUtils.Run: Run: e:\NVPACK\android-sdk-windows\platform-tools\adb.exe -s 2ce3820b shell "echo $EXTERNAL_STORAGE"
LogPlayLevel: CommandUtils.Run: Run: Took 0.1010711s to r



.

The recompiling those 3 files and relinking was a bug which will be fixed in 4.17.2 and 4.18, but you can locally fix it be adding this change to Engine/Source/Programs/UnrealBuildTool/AndroidToolChain.cs:

In CompileCPPFiles() add this at the top:


            CPPOutput Result = new CPPOutput();

            if (SourceFiles.Count == 0)
            {
                return Result;
            }


and remove the “CPPOutput Result = new CPPOutput();” line after the “// Create a compile action for each source file.” comment.