Unity 2019.2.0f1无法找到Android NDK [英] Unity 2019.2.0f1 Unable to locate Android NDK

查看:1064
本文介绍了Unity 2019.2.0f1无法找到Android NDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Unity 2019.2.0f1 中进行应用购买测试,并且当我尝试构建apk时,我不断收到错误消息:无法找到Android NDK 即使我下载了 Android NDK r16b ,并在编辑->首选项->外部工具

I am trying to test in app purchases in Unity 2019.2.0f1, and when I try to build the apk, I keep getting error: Unable to locate Android NDK even though I downloaded Android NDK r16b and changed the path in Edit --> Preferences --> External tools

我进行了大量搜索,并尝试安装多个版本的NDK,并尝试在我的电脑"设置的环境变量"中添加NDK的路径,但错误始终显示.

I searched alot and tried to install more than one version of NDK, and also tried to add the path of NDK in Environment Variables in settings of My Computer but the error kept showing.

有人可以告诉我如何解决这个问题吗?

Can someone please tell me how to solve this problem ?

谢谢.

推荐答案

我在Mac上的Unity 2019.2.8f1中遇到了同样的问题.我的解决方案是编辑->首选项->外部工具,然后取消选中随Unity安装的android NDK".然后在其中添加特定的NDK文件夹路径.对我来说 /Applications/Unity/Hub/Editor/2019.2.8f1/PlaybackEngines/AndroidPlayer/NDK/*android-ndk-r16b*

I had the same issue in Unity 2019.2.8f1 on mac. My solution is going to Edit --> Preferences --> External tools and uncheck "android NDK installed with Unity". Then add the specific NDK folder path in it. For me, it is /Applications/Unity/Hub/Editor/2019.2.8f1/PlaybackEngines/AndroidPlayer/NDK/*android-ndk-r16b*

有趣的是,自动设置为/Applications/Unity/Hub/Editor/2019.2.8f1/PlaybackEngines/AndroidPlayer/NDK/ 错过了特定的文件夹名称android-ndk-r16b.因此,我只在最后一个文件夹路径的末尾添加android-ndk-r16b.希望这可以帮助.

Interestingly, the automatic setup by unity is /Applications/Unity/Hub/Editor/2019.2.8f1/PlaybackEngines/AndroidPlayer/NDK/ which missed the specific folder name android-ndk-r16b. So I just add android-ndk-r16b at the end of the last folder path. Hope this helps.

这篇关于Unity 2019.2.0f1无法找到Android NDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆