Skip to content Skip to sidebar Skip to footer

Unity 2017.4.34f1 Cant Build Apk Using Il2cpp

I try to build my project using Unity 2017.4.34f1, because Google now need both 32 & 64 bit, so i choose IL2CPP. For Android NDK, I use r13b However, build failed and I get bel

Solution 1:

This failure occurs because the code in the project has extern methods in C#. Methods marked as extern with a the [Dllimport("__Internal")] attribute must be present in a native library that is linked with the Unity player when building with the IL2CPP scripting backend.

For example, this in this project one function which causes this issue is named: activateApp

You have two options:

  1. Build a native library with all of the methods marked as extern with the [Dllimport("__Internal")] attribute for the target platform and architecture of the player. See this documentation for details about native plugins: https://docs.unity3d.com/Manual/NativePlugins.html

  2. Remove the C# code which defines this extern method. You can do that with platform dependent compilation: https://docs.unity3d.com/Manual/PlatformDependentCompilation.html

In this case specifically, it looks like the error comes from the Facebook SDK. See if there is a newer Facebook SDK available - I believe this may have been corrected.

Post a Comment for "Unity 2017.4.34f1 Cant Build Apk Using Il2cpp"