Log in or register to post comments

Attempting to build 64-bit APK for Google Play

November 25, 2019 - 1:50pm #1

I have an application built in Unity 2017.4.15f1 (now migrated to 2018.3.0f2) using Vuforia version 7 (now migrated to 8.1) that I'm attempting to build with arm64 such that I can publish it to Google Play. I was able to build the application with arm64 on Unity 2017, but the camera was just a black screen when testing. I looked around and found out that 64-bit hadn't been properly supported until Vuforia v8 in Unity 2018.3. After migrating my project and attempting to build with arm64, I was greeted by this error message:

 

Quote:

Win32Exception: ApplicationName='C:\Program Files\2018.3.0f2\Editor\Data\il2cpp\build/UnityLinker.exe', CommandLine='-out="C:\Users\pmerritt\Documents\VuforiaMobileAppProject\Temp\StagingArea\assets\bin\Data\Managed\tempStrip" -x="C:\Program Files\2018.3.0f2\Editor\Data\PlaybackEngines\AndroidPlayer\Whitelists\Core.xml" -x "C:\Users\pmerritt\Documents\VuforiaMobileAppProject\Temp\StagingArea\assets\bin\Data\Managed\..\platform_native_link.xml" -x "C:\Users\pmerritt\AppData\Local\Temp\1\tmp58309e30.tmp" -x "C:\Users\pmerritt\AppData\Local\Temp\1\tmp5bb9a1b4.tmp" -d "C:\Users\pmerritt\Documents\VuforiaMobileAppProject\Temp\StagingArea\assets\bin\Data\Managed" --include-unity-root-assembly="C:\Users\pmerritt\Documents\VuforiaMobileAppProject\Temp\StagingArea\assets\bin\Data\Managed\Assembly-CSharp.dll" --include-unity-root-assembly="C:\Users\pmerritt\Documents\VuforiaMobileAppProject\Temp\StagingArea\assets\bin\Data\Managed\Pcx.Editor.dll" --include-unity-root-assembly="C:\Users\pmerritt\Documents\VuforiaMobileAppProject\Temp\StagingArea\assets\bin\Data\Managed\VuforiaScripts.dll" --include-unity-root-assembly="C:\Users\pmerritt\Documents\VuforiaMobileAppProject\Temp\StagingArea\assets\bin\Data\Managed\Pcx.dll" --include-unity-root-assembly="C:\Users\pmerritt\Documents\VuforiaMobileAppProject\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.UI.dll" --include-unity-root-assembly="C:\Users\pmerritt\Documents\VuforiaMobileAppProject\Temp\StagingArea\assets\bin\Data\Managed\Vuforia.UnityExtensions.dll" --include-unity-root-assembly="C:\Users\pmerritt\Documents\VuforiaMobileAppProject\Temp\StagingArea\assets\bin\Data\Managed\TextMeshPro-2017.3-Runtime.dll" --dotnetruntime=il2cpp --dotnetprofile=legacyunity --use-editor-options --include-directory=C:\Users\pmerritt\Documents\VuforiaMobileAppProject\Temp\StagingArea\assets\bin\Data\Managed --rule-set=Conservative', CurrentDirectory='C:\Users\pmerritt\Documents\VuforiaMobileAppProject\Temp\StagingArea\assets\bin\Data\Managed'

System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process)

System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process)

System.Diagnostics.Process.Start ()

(wrapper remoting-invoke-with-check) System.Diagnostics.Process:Start ()

UnityEditor.Utils.Program.Start (System.EventHandler exitCallback) (at C:/buildslave/unity/build/Editor/Mono/Utils/Program.cs:44)

UnityEditor.Utils.Program.Start () (at C:/buildslave/unity/build/Editor/Mono/Utils/Program.cs:28)

UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:106)

UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1 setupStartInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)

UnityEditorInternal.AssemblyStripper.RunAssemblyLinker (IEnumerable`1 args, System.String& out, System.String& err, System.String linkerPath, System.String workingDirectory) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:192)

UnityEditorInternal.AssemblyStripper.StripAssembliesTo (System.String[] assemblies, System.String[] searchDirs, System.String outputFolder, System.String workingDirectory, System.String& output, System.String& error, System.String linkerPath, IIl2CppPlatformProvider platformProvider, IEnumerable`1 additionalBlacklist, BuildTargetGroup buildTargetGroup, ManagedStrippingLevel managedStrippingLevel) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:124)

UnityEditorInternal.AssemblyStripper.RunAssemblyStripper (IEnumerable assemblies, System.String managedAssemblyFolderPath, System.String[] assembliesToStrip, System.String[] searchDirs, System.String monoLinkerPath, IIl2CppPlatformProvider platformProvider, UnityEditor.RuntimeClassRegistry rcr, ManagedStrippingLevel managedStrippingLevel) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:323)

UnityEditorInternal.AssemblyStripper.StripAssemblies (System.String managedAssemblyFolderPath, IIl2CppPlatformProvider platformProvider, UnityEditor.RuntimeClassRegistry rcr, ManagedStrippingLevel managedStrippingLevel) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:216)

UnityEditorInternal.IL2CPPBuilder.Run () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:203)

UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:35)

UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)

UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)

UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report)

UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties)

UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup, BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:286)

UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

 

I've tried multiple later versions of Unity and Vuforia, reinstalling Android SDK and NDKs, changing my Api compatibility level and scripting runtime versions, and even trying non-64-bit architectures. But this error seems to persist on 32-bit builds as well! Let me know if you know how to solve this issue or know of a good work-around of some kind, because I'm stuck. Thanks!

Attempting to build 64-bit APK for Google Play

December 3, 2019 - 10:26am #5

I've been unable to progress in finding a way to build my application for arm64 so I'm going to move on for now. My app is already on Google Play as a 32-bit version and I'm able to push 32-bit app updates until August 2021, so I'll continue to do so until I find a solution. Let me know if you have one!

Attempting to build 64-bit APK for Google Play

December 2, 2019 - 1:43pm #4

Wait, I was actually able to get a 64-bit build of the scene SamplesResources/Scenes/3-ImageTargets as well as SamplesResources/Scenes/3-GroundPlane. The latter has a black screen for a camera, but the former shows just fine! I'll take a closer look at the ImageTargets scene to see what I can steal from it, but if the GroundPlane one doesn't work, neither will mine since I rely on Ground Planes.

Attempting to build 64-bit APK for Google Play

December 2, 2019 - 1:29pm #3

Thanks for the reply! I've tried reinstalling Android SDK level 28 and 29, JDK 1.8 (though I can only get it to build with the built-in JDK anyway), and Android NDK r16b 64-bit.



These appear to be the recommended versions for their respective locations. If I'm wrong, or there's an alternative for any of them, please let me know!

 

I was able to build one of the sample scenes with the Mono back-end, leading me to believe the il2cpp transpiler is the source of the issue. Makes sense, since I'm getting an error from UnityLinker.exe located in the il2cpp path. Since Mono is limited to 32-bit, this isn't suitable for uploading to Google Play. So I need to get it to work for 64-bit (il2cpp).

Attempting to build 64-bit APK for Google Play

November 26, 2019 - 2:53am #2

Hi,

Googling the win32 exception when building for Android points to issues with the installed SDK/NDK and JDK.

Please make sure to have installed the recommended versions as per Unity 2018.3.

I would also recommend to try to build a simple unity project for android to see if it works.

Thank you.

Vuforia Engine Support

 

Log in or register to post comments