Failed to link ''

I am trying to build a 64bit version of an old app. I migrated the app to the new version (2019.1.10f1) of unity and it works as expected. But when I try to build the apk I get an error “Failed to link ‘’” and the following message appears in the Console:

C:/Program Files/Unity/Hub/Editor/2019.1.10f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/aarch64-linux-android-4.9/prebuilt/windows-x86_64/lib/gcc/aarch64-linux-android/4.9.x/…/…/…/…/aarch64-linux-android/bin\ld.bfd.exe: cannot find -lgnustl_static

What am I doing wrong? I have tried several solutions posted on line but none have worked so far.

Any help would be appreciated

Here is a screenshot of the build errors:

Are you using IL2CPP and with Strip Engine Code checked in your PlayerSettings?
I’m having the same issue after upgraded from Unity 2019.1.8f1 to 2019.1.10f1.
And I found if you unchecked Strip Engine Code in PlayerSettings, you can build as normal.

Unchecking Strip Engine Code in player settings worked for me.

In my case sometimes unity builtin NDK tools have issues !
try Scipting Backend : mono (if IL2CPP)
in target architecture only select arm v7

see if that resolves the issue . if it does

Then redownload NDK from the internet and paste it in :
C:\Program Files\Unity\Hub\Editor\2019.1.9f1\Editor\Data\PlaybackEngines\AndroidPlayer

Hope it resolves your issue !

You need to specify the address where the sdk is directed to, the tools folder that you get when you download them, for example if your tools folder is in MySDK folder, do not select the MySDK folder, but the tools folder inside it as the address of the SDK, this will solve the problem

In my case, I unchecked “optimize mesh data” box. and it worked.

Uncheck “Strip Engine Code” in Player setting