In this article we are going to see how to export from Unity to Android and compile 32-bit and 64-bit versions, necessary to be able to publish a game or application on Google Play.
The following video is divided in two parts, the first 5 minutes are about how to configure the Unity engine to compile the 32-bit and 64-bit versions. The second part shows how I fixed a technical error with the message: “IL2CPP.exe did not run properly!”.
A SHORT BREAK WITH THE LATEST NEWS
LET'S CONTINUE WITH THE ARTICLE
Graphic Engine and Android Tools
First of all we need to have installed everything we need to export from Unity to Android. In addition to Unity itself we will need 4 extra tools. Android Build Support, Android SDK, Android NDK and Java JDK.
All this can be obtained from Unity HUB when installing a new version of the engine or we can add these modules to the version we have previously installed.
Inside Unity we must make sure that these tools are configured. In the Edit > Preferences tab go to the “External Tools” section.
In case we install the tools using Unity HUB, the JDK, SDK and NDK boxes must be checked, in case we install these tools ourselves we must uncheck those boxes and indicate the paths where these tools are installed.
Unity configuration for exporting in 32 and 64 bits
By default, when starting a new Android project we can export a 32-bit application, to export both architectures we must go to the window “Project Settings > Player” we can go from the Edit tab > Project Settings or from the build window (File > Build Settings).
Inside the Player window we go to the “Other Settings” section and we must change the “Scripting Backend” parameter from “Mono” to “IL2CPP”, this will enable the “ARM64” checkbox, click on this checkbox and this will allow us to create a compilation for the 64 bits architecture.
When compiling the game, I suggest using the “App Bundle” option, which will export the game in a file with .aab extension that will contain both architectures, this file can be uploaded to Google Play.
Error IL2CPP.exe did not run properly!
I spent a few days trying to fix the error “IL2CPP.exe did not run properly!” that came up when trying to export the game in 64-bit.
Apparently the error is due to the NDK tool, I was consulting different forums but I did not find a concrete solution.
After several days I was able to solve the problem. In the video you can see the detailed information about how I particularly solve IL2CPP.exe did not run properly error.