Download

Created own blueprint and packaging doesn't work

Hi guys,
I tried to make an own script (using C++) to create a new Blueprint Node. Since I have clicked at the button “Add code to project…” I have not been able to package my project anymore. In the output log I have probably found the main error that fails the packaging. It says “MainFrameActions: Packaging (Android (ETC1)): Program.Main: ERROR: Exception in UnrealBuildTool: ERROR: Can’t make an APK without the compiled .so [C:\Users\MyName\Documents\Unreal Projects\ProjectName\Binaries\Android\ProjectName-Android-Shipping-armv7-es2.so]” I searched the internet for some solutions and I found I should compile the project. I don’t actually know what, does it mean, because this is the first time I was making my own scripts in UE. If it means that I should click on the “Compile” button that appeared at the top menu, then I have done it. Many times with no problems… I have some problems with Visual Studio, so I would like to simply “take it back” to the version, where were no own codes. Is it possible to make it somehow (I don’t have a backup of the whole project folder). Or is it like that there is no other way then to fix Microsoft Visual Studio? Because I don’t know what to do… I can’t understand a lot of things about making the .so file… I would need a step-by-step tutorial probably :smiley:

Here is the Ouput log (everything after STAGE-COMMAND-COMPLETED phase) for case that the problem is somewhere else:


MainFrameActions: Packaging (Android (ETC1)): Project.CopyBuildToStagingDirectory: ********** STAGE COMMAND COMPLETED **********
MainFrameActions: Packaging (Android (ETC1)): InternalUtils.SafeFileExists: SafeFileExists C:\Users\MyName\Documents\Unreal Projects\ProjectName\ProjectName.uproject=True
MainFrameActions: Packaging (Android (ETC1)): InternalUtils.SafeFileExists: SafeFileExists C:\Users\MyName\Documents\Unreal Projects\ProjectName\ProjectName.uproject=True
MainFrameActions: Packaging (Android (ETC1)): InternalUtils.SafeCreateDirectory: SafeCreateDirectory C:\Users\MyName\Documents\Unreal Projects\ProjectName\Saved\StagedBuilds\Android_ETC1
MainFrameActions: Packaging (Android (ETC1)): InternalUtils.SafeCreateDirectory: SafeCreateDirectory C:\Users\MyName\Desktop\Android_ETC1
MainFrameActions: Packaging (Android (ETC1)): Project.LogDeploymentContext: Deployment Context **************
MainFrameActions: Packaging (Android (ETC1)): Project.LogDeploymentContext: ArchiveDirectory = C:\Users\MyName\Desktop\Android_ETC1
MainFrameActions: Packaging (Android (ETC1)): Project.LogDeploymentContext: RawProjectPath = C:\Users\MyName\Documents\Unreal Projects\ProjectName\ProjectName.uproject
MainFrameActions: Packaging (Android (ETC1)): Project.LogDeploymentContext: IsCodeBasedUprojectFile = True
MainFrameActions: Packaging (Android (ETC1)): Project.LogDeploymentContext: DedicatedServer = False
MainFrameActions: Packaging (Android (ETC1)): Project.LogDeploymentContext: Stage = True
MainFrameActions: Packaging (Android (ETC1)): Project.LogDeploymentContext: StageTargetPlatform = Android
MainFrameActions: Packaging (Android (ETC1)): Project.LogDeploymentContext: LocalRoot = C:\Program Files\Epic Games\4.7
MainFrameActions: Packaging (Android (ETC1)): Project.LogDeploymentContext: ProjectRoot = C:\Users\MyName\Documents\Unreal Projects\ProjectName
MainFrameActions: Packaging (Android (ETC1)): Project.LogDeploymentContext: PlatformDir = Android
MainFrameActions: Packaging (Android (ETC1)): Project.LogDeploymentContext: StageProjectRoot = C:\Users\MyName\Documents\Unreal Projects\ProjectName\Saved\StagedBuilds\Android_ETC1\ProjectName
MainFrameActions: Packaging (Android (ETC1)): Project.LogDeploymentContext: ShortProjectName = ProjectName
MainFrameActions: Packaging (Android (ETC1)): Project.LogDeploymentContext: StageDirectory = C:\Users\MyName\Documents\Unreal Projects\ProjectName\Saved\StagedBuilds\Android_ETC1
MainFrameActions: Packaging (Android (ETC1)): Project.LogDeploymentContext: SourceRelativeProjectRoot = ProjectName
MainFrameActions: Packaging (Android (ETC1)): Project.LogDeploymentContext: RelativeProjectRootForStage = ProjectName
MainFrameActions: Packaging (Android (ETC1)): Project.LogDeploymentContext: RelativeProjectRootForUnrealPak = ProjectName
MainFrameActions: Packaging (Android (ETC1)): Project.LogDeploymentContext: ProjectArgForCommandLines = ../../../ProjectName/ProjectName.uproject
MainFrameActions: Packaging (Android (ETC1)): Project.LogDeploymentContext: RuntimeRootDir = C:\Users\MyName\Documents\Unreal Projects\ProjectName\Saved\StagedBuilds\Android_ETC1
MainFrameActions: Packaging (Android (ETC1)): Project.LogDeploymentContext: RuntimeProjectRootDir = C:\Users\MyName\Documents\Unreal Projects\ProjectName\Saved\StagedBuilds\Android_ETC1\ProjectName
MainFrameActions: Packaging (Android (ETC1)): Project.LogDeploymentContext: UProjectCommandLineArgInternalRoot = ../../../
MainFrameActions: Packaging (Android (ETC1)): Project.LogDeploymentContext: PakFileInternalRoot = ../../../
MainFrameActions: Packaging (Android (ETC1)): Project.LogDeploymentContext: UnrealFileServerInternalRoot = ../../../
MainFrameActions: Packaging (Android (ETC1)): Project.LogDeploymentContext: End Deployment Context **************
MainFrameActions: Packaging (Android (ETC1)): Project.Package: ********** PACKAGE COMMAND STARTED **********
MainFrameActions: Packaging (Android (ETC1)): AndroidPlatform.Package: BaseApkName = C:\Users\MyName\Documents\Unreal Projects\ProjectName\Binaries/Android\ProjectName-Android-Shipping.apk
MainFrameActions: Packaging (Android (ETC1)): AndroidPlatform.Package: Creating C:\Users\MyName\Documents\Unreal Projects\ProjectName\Saved\StagedBuilds\Android_ETC1.obb from C:\Users\MyName\Documents\Unreal Projects\ProjectName\Saved\StagedBuilds\Android_ETC1
MainFrameActions: Packaging (Android (ETC1)): <>c__DisplayClass1.<Package>b__0: [1/1] Adding ProjectName/ to OBB
MainFrameActions: Packaging (Android (ETC1)): <>c__DisplayClass1.<Package>b__0: [2/2] Adding ProjectName/Content/ to OBB
MainFrameActions: Packaging (Android (ETC1)): <>c__DisplayClass1.<Package>b__0: [3/3] Adding ProjectName/Content/Movies/ to OBB
MainFrameActions: Packaging (Android (ETC1)): <>c__DisplayClass1.<Package>b__0: [4/4] Adding ProjectName/Content/Movies/Intro.mp4 to OBB
MainFrameActions: Packaging (Android (ETC1)): <>c__DisplayClass1.<Package>b__0: [5/5] Adding ProjectName/Content/Movies/Intro.uasset to OBB
MainFrameActions: Packaging (Android (ETC1)): <>c__DisplayClass1.<Package>b__0: [6/6] Adding ProjectName/Content/Paks/ to OBB
MainFrameActions: Packaging (Android (ETC1)): <>c__DisplayClass1.<Package>b__0: [7/7] Adding ProjectName/Content/Paks/ProjectName-Android_ETC1.pak to OBB
MainFrameActions: Packaging (Android (ETC1)): UEDeployAndroid.MakeApk: 
MainFrameActions: Packaging (Android (ETC1)): ====15.5.2015 15:00:20====PREPARING TO MAKE APK=================================================================
MainFrameActions: Packaging (Android (ETC1)): Building Java with SDK API level 'android-19'
MainFrameActions: Packaging (Android (ETC1)): UEDeployAndroid.CheckDependencies: C:\Users\MyName\Documents\Unreal Projects\ProjectName\Binaries\Android\ProjectName-Android-Shipping-armv7-es2.apk is out of date due to newer input file C:\Program Files\Epic Games\4.7\Engine\Build\Android\Java\proguard-project.txt
MainFrameActions: Packaging (Android (ETC1)): UEDeployAndroid.MakeApk: Performing complete package - wiping C:\Users\MyName\Documents\Unreal Projects\ProjectName\Intermediate/Android/APK, except for predexedLibs
MainFrameActions: Packaging (Android (ETC1)): UEDeployAndroid.MakeApk: bPackageDataInsideApk = False
MainFrameActions: Packaging (Android (ETC1)): UEDeployAndroid.UpdateProjectProperties: 
MainFrameActions: Packaging (Android (ETC1)): ====15.5.2015 15:00:22====UPDATING BUILD CONFIGURATION FILES====================================================
MainFrameActions: Packaging (Android (ETC1)): UEDeployAndroid.RunCommandLineProgramAndThrowOnError: Updating project.properties, local.properties, and build.xml...
MainFrameActions: Packaging (Android (ETC1)): UEDeployAndroid.MakeApk: 
MainFrameActions: Packaging (Android (ETC1)): ====15.5.2015 15:00:27====PREPARING NATIVE CODE=================================================================
MainFrameActions: Packaging (Android (ETC1)): BuildCommand.Execute: ERROR: BUILD FAILED
MainFrameActions: Packaging (Android (ETC1)): Program.Main: ERROR: AutomationTool terminated with exception:
MainFrameActions: Packaging (Android (ETC1)): Program.Main: ERROR: Exception in UnrealBuildTool: ERROR: Can't make an APK without the compiled .so [C:\Users\MyName\Documents\Unreal Projects\ProjectName\Binaries\Android\ProjectName-Android-Shipping-armv7-es2.so]
MainFrameActions: Packaging (Android (ETC1)): Stacktrace:    v UnrealBuildTool.Android.UEDeployAndroid.MakeApk(String ProjectName, String ProjectDirectory, String OutputPath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bMakeSeparateApks, Boolean bIncrementalPackage, Boolean bDisallowPackagingDataInApk)
MainFrameActions: Packaging (Android (ETC1)):    v UnrealBuildTool.Android.UEDeployAndroid.PrepForUATPackageOrDeploy(String ProjectName, String ProjectDirectory, String ExecutablePath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bIsDataDeploy)
MainFrameActions: Packaging (Android (ETC1)):    v AndroidPlatform.Package(ProjectParams Params, DeploymentContext SC, Int32 WorkingCL)
MainFrameActions: Packaging (Android (ETC1)):    v Project.Package(ProjectParams Params, Int32 WorkingCL)
MainFrameActions: Packaging (Android (ETC1)):    v BuildCookRun.DoBuildCookRun(ProjectParams Params)
MainFrameActions: Packaging (Android (ETC1)):    v BuildCommand.Execute()
MainFrameActions: Packaging (Android (ETC1)):    v AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
MainFrameActions: Packaging (Android (ETC1)):    v AutomationTool.Automation.Process(String] CommandLine)
MainFrameActions: Packaging (Android (ETC1)):    v AutomationTool.Program.MainProc(Object Param)
MainFrameActions: Packaging (Android (ETC1)):    v AutomationTool.InternalUtils.RunSingleInstance(MainProc Main, Object Param)
MainFrameActions: Packaging (Android (ETC1)):    v AutomationTool.Program.Main()
MainFrameActions: Packaging (Android (ETC1)): Program.Main: ERROR: ERROR: Can't make an APK without the compiled .so [C:\Users\MyName\Documents\Unreal Projects\ProjectName\Binaries\Android\ProjectName-Android-Shipping-armv7-es2.so]
MainFrameActions: Packaging (Android (ETC1)): ProcessManager.KillAll: Trying to kill 0 spawned processes.
MainFrameActions: Packaging (Android (ETC1)): Program.Main: AutomationTool exiting with ExitCode=1
MainFrameActions: Packaging (Android (ETC1)): Domain_ProcessExit
MainFrameActions: Packaging (Android (ETC1)): ProcessManager.KillAll: Trying to kill 0 spawned processes.
MainFrameActions: Packaging (Android (ETC1)): copying UAT log files...
MainFrameActions: Packaging (Android (ETC1)): RunUAT.bat ERROR: AutomationTool was unable to run successfully.
MainFrameActions: Packaging (Android (ETC1)): BUILD FAILED

---------------------EDIT-------------
I have found on the internet that I have to refresh my Visual Studio project, so I did it (in the “File” menu ->“Refresh Visual Studio Project”), but now the problem has changed… Now it fails because of this error (probably) “Program.Main: ERROR: BUILD FAILED: Failed while running Cook for C:\Users\MyName\Documents\Unreal Projects\ProjectName\ProjectName.uproject; see log C:\Users\MyName\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+4.7\Cook.txt”… I took a look in the “cook.txt” and it seems that the problem is caused by me. I have removed some components in my player pawn and probably theirs references were used somewhere in the project… I am going to look for them and fix it. But the fact is, this error is caused before the “.so problem”, so it may have not changed anything. I’ll see after fixing the references…

Hi Sojka,

Sometimes there are errors higher up that the part you’ve posted, so it’s usually best to post the whole log just to be safe. In this case, however, I do think your main problem is not having compiled in Visual Studio. Here is another forums thread with a user having the same error, try Chris’s suggestion and see if that helps.

Further, if you’re brand new to C++ and Visual Studio, here is the UE4 documentation on that.

Thanks for your advice, but I am not good in the developer terminology :smiley: I am kinda like autodidact :smiley: I mean - “Solution” → what file is that? Is that the .sln file in located in the root of the project’s folder?
---------EDIT------------
I tried to build the solution (probably the .slt file) but is it necessarily required to have some android device connected? It show me 3 errors:

  1. error : linker command failed with exit code 1 (use -v to see invocation) C:\Users\MyName\Documents\Unreal Projects\ProjectName\Intermediate\ProjectFiles\clang++.exe
  2. error : Failed to produce item: C:\Users\MyName\Documents\Unreal Projects\ProjectName\Binaries\Android\ProjectName-armv7-es2.so C:\Users\MyName\Documents\Unreal Projects\ProjectName\Intermediate\ProjectFiles\ERROR
  3. error MSB3073: The command ““C:\Program Files\Epic Games\4.7\Engine\Build\BatchFiles\Build.bat” ProjectName Android Development “C:\Users\MyName\Documents\Unreal Projects\ProjectName\ProjectName.uproject” -rocket” exited with code -1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.targets 38 5

And should I use debugging in development mode if I want to publish it on Google Play?