Unity3d : Android Arm64 il2cpp build error


        Hi everyone, this year Android will be change and update many things, so on developer must be change and update too. The most blocking me is force App / Game 32-Bit to 64-Bit since i've use old Unity3d version 2017 and never change due to my old laptop but Q3 of this year i must change and i've try then i founded an issue.


        The problem is the Android 32-Bit to 64-Bit needed to change Scripting Backend from "Mono" to be "IL2CPP", for iOS, yes, it can be easier but for Android i'm struggle with many build error.

Scripting Backend - Mono

Scripting Backend - IL2CPP

In the case i've use my custom plugin then building with iOS platform il2cpp it's fine without problem but for Android platform it's look like the compiler try to hook iOS plugin to Android platform also then it's error undefined. Like this.


        After struggling many hours, i've found the clue about Unity3d, when i build and use custom plugin. The API for check platform runtime is the cause of issues above, Here.

Application.platform == RuntimePlatform.IPhonePlayer
Application.platform == RuntimePlatform.Android

This is the most favourite i love to use determine the platform my app / game running on but today, i told myself that suck, i don't want to use it again. The best way to determine platform is using platform dependent compilation, like this.

#if UNITY_IPHONE
//implement for iOS
#elif UNITY_ANDROID
//implement for Android
#endif

        The platform dependent compilation will be safe and working correctly when compile time it's separate platform before running, so the error never occurs like platform runtime. This is simple for anyone, i know but this is my mistaken when create custom plugin multi-platform.

        Coding meanwhile learning every time. If who was founded an error like me just check where you've implement platform runtime condition, please change to platform dependent compilation. And your build il2cpp for Android 64-Bit
will be fine. See ya next thread :)

No Like, No Thumbs Up, No Bell, Just support me by click ads, thank you...

Comments

  1. Game Dev To Died: Unity3D : Android Arm64 Il2Cpp Build Error >>>>> Download Now

    >>>>> Download Full

    Game Dev To Died: Unity3D : Android Arm64 Il2Cpp Build Error >>>>> Download LINK

    >>>>> Download Now

    Game Dev To Died: Unity3D : Android Arm64 Il2Cpp Build Error >>>>> Download Full

    >>>>> Download LINK 5R

    ReplyDelete

Post a Comment