-
Notifications
You must be signed in to change notification settings - Fork 68
Is Android possible in the near future? #73
Comments
I haven't tried Android yet but it shouldn't be too much work to support it. Currently I don't have any phones to test this so I'm not sure how much I can do. A starting point would be to add Android as a whitelisted platform https://github.com/pixeltris/USharp/blob/master/USharp.uplugin and see if USharp compiles. |
Well the first step could be to make a mobile build to generate a single APK file. I can do that because I've a working setup. |
Are there any Android emulators / simulators which work well with UE4? There are some issues which have popped up on Mac builds which may impact Linux / Android so I'll try out an emulator once I have fixed the Mac issues. |
Yes, when you install Android Studio, you've an emulator with it. This way you can build an APK from UE4 and then send it to the emulator to try it. I'm going to try to make a build tomorrow on at office. Cross finger it'll be OK. For now I've enabled the Android platform in the uplugin as suggested in your first reply. |
I tried to compile a simple scene with that result UATHelper: Packaging (Android (ASTC)): Running AutomationTool...
UATHelper: Packaging (Android (ASTC)): Parsing command line: -ScriptsForProject="C:/Users/demon/Documents/Unreal Projects/USharpMobile/USharpMobile.uproject" BuildCookRun -nocompile -nocompileeditor -installed -nop4 -project="C:/Users/demon/Documents/Unreal Projects/USharpMobile/USharpMobile.uproject" -cook -stage -archive -archivedirectory=D:/demon/Download
s -package -clientconfig=Development -ue4exe="D:\Devel\Epic Games\UE_4.22\Engine\Binaries\Win64\UE4Editor-Cmd.exe" -pak -prereqs -nodebuginfo -targetplatform=Android -cookflavor=ASTC -build -utf8output
UATHelper: Packaging (Android (ASTC)): Setting up ProjectParams for C:\Users\demon\Documents\Unreal Projects\USharpMobile\USharpMobile.uproject
UATHelper: Packaging (Android (ASTC)): USharpMobile.uproject requires a temporary target.cs to be generated (USharp plugin is enabled)
UATHelper: Packaging (Android (ASTC)): ********** BUILD COMMAND STARTED **********
UATHelper: Packaging (Android (ASTC)): Running: D:\Devel\Epic Games\UE_4.22\Engine\Binaries\DotNET\UnrealBuildTool.exe USharpMobile Android Development -Project="C:\Users\demon\Documents\Unreal Projects\USharpMobile\USharpMobile.uproject" "C:\Users\demon\Documents\Unreal Projects\USharpMobile\USharpMobile.uproject" -NoUBTMakefiles -remoteini="C:\Users\demo
n\Documents\Unreal Projects\USharpMobile" -skipdeploy -Manifest="C:\Users\demon\Documents\Unreal Projects\USharpMobile\Intermediate\Build\Manifest.xml" -NoHotReload -log="C:\Users\demon\AppData\Roaming\Unreal Engine\AutomationTool\Logs\D+Devel+Epic+Games+UE_4.22\UBT-USharpMobile-Android-Development.txt"
UATHelper: Packaging (Android (ASTC)): PLATFORM_ANDROID_NDK_VERSION = 140200
UATHelper: Packaging (Android (ASTC)): NDK toolchain: r14b, NDK version: 19, GccVersion: 4.9, ClangVersion: 3.8.275480
UATHelper: Packaging (Android (ASTC)): Parsing headers for USharpMobile
UATHelper: Packaging (Android (ASTC)): Running UnrealHeaderTool "C:\Users\demon\Documents\Unreal Projects\USharpMobile\USharpMobile.uproject" "C:\Users\demon\Documents\Unreal Projects\USharpMobile\Intermediate\Build\Android\USharpMobile\Development\USharpMobile.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -Warni
ngsAsErrors -installed
UATHelper: Packaging (Android (ASTC)): Reflection code generated for USharpMobile in 11,2493995 seconds
UATHelper: Packaging (Android (ASTC)): ERROR: Missing precompiled manifest for 'USharp'. This module was most likely not flagged for being included in a precompiled build - set 'PrecompileForTargets = PrecompileTargetsType.Any;' in USharp.build.cs to override.
PackagingResults: Error: Missing precompiled manifest for 'USharp'. This module was most likely not flagged for being included in a precompiled build - set 'PrecompileForTargets = PrecompileTargetsType.Any;' in USharp.build.cs to override.
UATHelper: Packaging (Android (ASTC)): Took 23,8392524s to run UnrealBuildTool.exe, ExitCode=5
UATHelper: Packaging (Android (ASTC)): ERROR: UnrealBuildTool failed. See log for more details. (C:\Users\demon\AppData\Roaming\Unreal Engine\AutomationTool\Logs\D+Devel+Epic+Games+UE_4.22\UBT-USharpMobile-Android-Development.txt)
UATHelper: Packaging (Android (ASTC)): (see C:\Users\demon\AppData\Roaming\Unreal Engine\AutomationTool\Logs\D+Devel+Epic+Games+UE_4.22\Log.txt for full exception trace)
PackagingResults: Error: UnrealBuildTool failed. See log for more details. (C:\Users\demon\AppData\Roaming\Unreal Engine\AutomationTool\Logs\D+Devel+Epic+Games+UE_4.22\UBT-USharpMobile-Android-Development.txt)
UATHelper: Packaging (Android (ASTC)): AutomationTool exiting with ExitCode=5 (5)
UATHelper: Packaging (Android (ASTC)): BUILD FAILED
PackagingResults: Error: Unknown Error Any ideas? I'll investigate to see if I can found something. |
Hey,
Xamarin is now open source and can be installed on Windows et Mac (not sure about Linux). On Windows it's installed from Visual Studio Installer. |
I'm not sure Xamarin should actually be required. Xamarin includes all of the APIs required to interact with Android/iOS, but a regular embedded Mono solution should work just fine (without additional bloat that might come from Xamarin). Doing it the embedded way might need Mono to be compiled manually for Android though. Based on the USharp.Build.cs error it sounds like it just needs some changes to |
#76 this issue might stifle Android support. I haven't tried Linux yet but currently Mac is broken due to this issue. There is a good chance all Unix-like platforms are impacted. Unfortunately the only thing I can think of is some attempt at manually fixing the register mismatch, or engine modifications. |
For the build.cs error you just need to recompile the C++ after adding You can get the Mono .so files for Android from a Xamarin install or download a Xamarin archive from here https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android-linux/ and grab the .so files which are under To get Mono to build for Android manually you need to follow the steps here https://github.com/mono/mono/tree/master/sdks, it's fairly straight forward. I used Linux, grabbed a version of Mono from https://download.mono-project.com/sources/mono/ (think these versions don't contain the I still need to write some additional code to handle loading of Mono under Android as the C# game dlls / Mono are currently being packaged into a .obb file which gets mounted to a virtual UE4 file system and therefore Mono cannot operate properly from it. |
That's awesome! The Android platform will be a great addition to this plugin. |
d23b0e3 this commit adds basic Mono loader functionality. It has to copy all of the Mono files / .NET game assemblies out of the apk so that Mono can function as expected (at the moment it will just freeze at the splash screen while it does this. it can also take up a lot of disk space). Much more work would be required to load assemblies directly from the apk (Xamarin.Android does this https://github.com/xamarin/xamarin-android/tree/master/src/monodroid/jni). I have tested the C# Puzzle template project and it seems to work. To test this you need to add
Grab Xamarin from https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android-linux/
|
Hello,
The plugin works well on the Windows platform. Can we expect an Android compatiblity in a near future? What do you need to make it possible? Can we help you? If yes how?
The text was updated successfully, but these errors were encountered: