Unity, how to compile 32-bit and 64-bit App for Google Play — IL2CPP Error


In this arti­cle we are going to see how to export from Uni­ty to Android and com­pile 32-bit and 64-bit ver­sions, nec­es­sary to be able to pub­lish a game or appli­ca­tion on Google Play.

The fol­low­ing video is divid­ed in two parts, the first 5 min­utes are about how to con­fig­ure the Uni­ty engine to com­pile the 32-bit and 64-bit ver­sions. The sec­ond part shows how I fixed a tech­ni­cal error with the mes­sage: "IL2CPP.exe did not run properly!".


Graphic Engine and Android Tools

First of all we need to have installed every­thing we need to export from Uni­ty to Android. In addi­tion to Uni­ty itself we will need 4 extra tools. Android Build Sup­port, Android SDK, Android NDK and Java JDK.

All this can be obtained from Uni­ty HUB when installing a new ver­sion of the engine or we can add these mod­ules to the ver­sion we have pre­vi­ous­ly installed.

Inside Uni­ty we must make sure that these tools are con­fig­ured. In the Edit > Pref­er­ences tab go to the "Exter­nal Tools" section.

In case we install the tools using Uni­ty HUB, the JDK, SDK and NDK box­es must be checked, in case we install these tools our­selves we must uncheck those box­es and indi­cate the paths where these tools are installed.

Unity configuration for exporting in 32 and 64 bits

By default, when start­ing a new Android project we can export a 32-bit appli­ca­tion, to export both archi­tec­tures we must go to the win­dow "Project Set­tings > Play­er" we can go from the Edit tab > Project Set­tings or from the build win­dow (File > Build Settings).

Inside the Play­er win­dow we go to the "Oth­er Set­tings" sec­tion and we must change the "Script­ing Back­end" para­me­ter from "Mono" to "IL2CPP", this will enable the "ARM64" check­box, click on this check­box and this will allow us to cre­ate a com­pi­la­tion for the 64 bits architecture.

When com­pil­ing the game, I sug­gest using the "App Bun­dle" option, which will export the game in a file with .aab exten­sion that will con­tain both archi­tec­tures, this file can be uploaded to Google Play.

Error IL2CPP.exe did not run properly!

I spent a few days try­ing to fix the error "IL2CPP.exe did not run prop­er­ly!" that came up when try­ing to export the game in 64-bit.

Appar­ent­ly the error is due to the NDK tool, I was con­sult­ing dif­fer­ent forums but I did not find a con­crete solution.

After sev­er­al days I was able to solve the prob­lem. In the video you can see the detailed infor­ma­tion about how I par­tic­u­lar­ly solve IL2CPP.exe did not run prop­er­ly error.

Scroll to Top
Secured By miniOrange