Windows (Android Build Target) Packager Fails with mscorlib error

After installing the NVPACK android SDK and following up normal installs of API attempting to package for Android in Windows fails with the attached message. No direction is provided for fixing the incoming data that appears to be breaking the apk construction. This is using a stock, unmodified Manifest (generated by the Project Settings utility.)

Expected Result:

The output log should indicate which field is being evaluated that crashes the packager or it should be more resilient and not bail if data doesn’t conform perfectly.

link text

Howdy Thomas,

Thank you for your bug report. If possible, could you share your project log files and your dxdiag? This will help with a better investigation of the issue.

Thanks and have a great day!

You should consider adding .log to the allowed file extensions list on your answers site. :slight_smile:

DxDiag
Android Windows build log

Related to this same project: Unreal Editor Crashes on Project Launch - Platform & Builds - Unreal Engine Forums

Any updates?

Hey Thomas,

Just a quick question for you. Is your projects a code based or blueprint based project?

Hey Thomas,

I have looked into a couple of other issues and have possibly found what could help with your issue. In your project, open up the project settings form the Edit tab in the editor. Select the Maps and Modes section and look at the Default Modes subsection. In the Default Game Mode, make sure is it set to anything besides ‘none’. Also, in the arrow drop down of the Default Modes subsection, look for Global Default Server Game Mode and make sure that that is set to anything except ‘none’. Then try and package.

If this does not work for you, please let me know. Thanks!

Blueprints.

Sean,

I have done what you suggested and I get the same failure and stacktrace as included above. What’s next? :slight_smile:

Hey Thomas,

Just wanted to ask a couple more questions before I write this issue up as a bug. What Android build are you using (Android, Android ACT, Android ETC1…) ? Also, have you tried to build in 4.3? There were many bugs fixed between 4.2.1 and 4.3, so i just wanted to check and see if maybe that was solved. Any additional information you could provide would be greatly appreciated.

Thanks for your patience and have a great day!

I’ve tried Android, Android (ACT) and (ETC1), PVR, all had the same result. I attempted to migrate my project to 4.3 this morning and rendering broke in the iPhone output so I’ve had to leave off that process for now.

Hey Thomas,

I have done a bit more research on your error and think that this issue may have something to do with the Microsoft and not in UE4. Here is a link to where I found that information: http://answers.microsoft.com/en-us/windows/forum/windows_xp-windows_programs/fatal-error-mscorlibdll/daa29708-e66b-4cba-a37a-fa9fee39d116

There are a couple of responses to the question that may help troubleshoot with the issue. If the same outcome still occurs, let me know.

Sean,

I ran AVG registry cleaner, rebooted and attempted to package (same failure.)
I uninstalled my .Net frameworks and reinstalled, rebooted (required) and attempted to package (same failure.)

The error message as follows:

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 mscorlib: Input string was not in a correct format.
MainFrameActions: Packaging (Android (ETC1)): Stacktrace:    at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
MainFrameActions: Packaging (Android (ETC1)):    at System.Number.
MainFrameActions: Packaging (Android (ETC1)): ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
MainFrameActions: Packaging (Android (ETC1)):    at UnrealBuildTool.AndroidToolChain.GetLargestApiLevel(String[] ApiLevels)

There are a few ndk directories, this appeared to be the latest.

10906-android-ndk-dirlist.jpg

That indicates a problem in the code looking for the version of the API in your Android SDK. There’s a directory with a name I’m not expecting.

Look in %NDKROOT%\platforms directory (possibly C:\NVPACK\android-ndk-r9c or similar). What directories do you see? Anything that’s not “android-XX”?

Well, that looks all correct - I have no idea why the function would be crashing…

The code gets a list of directories in the platforms dir, loops over them, splits the names on the dash, and converts what’s after the dash to a number. The error is saying that what I’m trying to convert is not a number.

Have you ever been able to build for Android?

A workaround here is to just force an API version:

  • Make a new text file {My Documents}\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml
  • Set the contents to what’s in this file: BuildConfiguration.xml
  • Make sure to remove the .txt extension

I haven’t.

This location is at:

C:\Users[me]\AppData\Roaming\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml

For me.

link text