android ndk r17 64,Cannot use old NDK (android-ndk-r17c) after Catalina upgrade due to new security

After upgrading to macOS Catalina, my project won't build anymore. This is due to Catalina believing the binaries in 'android-ndk-r17c' to not be from a trusted developer.

You get messages such as:

"“ld” cannot be opened because the developer cannot be verified."

"macOS cannot verify that this app is free from malware"

I have to use the old NDK due to problems with native openCV library SDK and newer NDKs. They are working on it, but the newer SDK is not stable enough for me yet.

I was able to get around "clang" and "clang++" not being able to work by going to the security pane and clicking "Allow Anyway" on the security alerts. However, when trying this with "Id", I can get past the first warning by clicking "Allow Anyway" but it seems to be called subsequently and on the subsequent call I do not have the option to allow it to open.

There is no code really. I just have (and have had for a long time) Android Studio NDK reference pointing to the old NDK via the config.

In IDE from NDK, it fails to load "Id":

"“ld” cannot be opened because the developer cannot be verified."

"macOS cannot verify that this app is free from malware"

# Answer 1

4d350fd91e33782268f371d7edaa8a76.png

I just found the solution.

It's a tedious process but:

MacOS: Open up System Preferences

MacOS: Go to Security & Privacy (keep this one open, you'll need it for the entire process)

Unity: Go and build your project. When the error appears click "Cancel"

MacOS: In the Security & Privacy window - go and click "Allow" near the "clang" error - so that the MacOS system will recognize the app and utilise it.

The error will appear again, but this time will ask you to "Open" it. Click "Open"

The build will fail several times due to various dependencies, but it will fail with different files that you will need to allow as in the previous steps.

Build again your project.

If it fails, do the steps again, until it stops failing. Every single error you get with the file not being recognized will be different each time

# Answer 2

To allow apps downloaded from Anywhere on MacOs Catalana do this:

sudo spctl --master-disable

# Answer 3

I'd like to add to Mudassar Ashraf's answer.

If you don't see «Allow» option after clicking «Cancel», switch «Allow apps downloaded from» in Security window to «App Store and identified developers». This somehow will make «Allow» button appear. Then switch it back to «Anywhere». Repeat if necessary.

# Answer 4

If by some reason in your Security & Privacy window button allow doesnt appear then just move your ndk to different directory and try whole process again.

# Answer 5

Find your clang++ program inside the ndk directory (ndkpath/toolchains/llvm/prebuilt/darwin-x86_64/bin/) then right click and open

# Answer 6

There is a better way to work it around now.

You could got to Security & Privacy, open Developer Tools and add your terminal app to the list of the tools. The same could be done for your IDE.

# Answer 7

The solution is mentioned above. go to Terminal and run this code to allow apps from "Anywhere" and in security make sure "Anywhere" is selected. This will prevent from asking you 100 times if you want to allow xxx file downloaded from xxx as well as multiple build failures.

sudo spctl --master-disable

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值