NDK不包含任何平台 [英] NDK does not contain any platforms

查看:1289
本文介绍了NDK不包含任何平台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想安装NDK以便能够使用C/C ++本机库.尝试安装NDK时,出现错误,提示我C:驱动器中没有足够的磁盘空间(因为下载位置位于临时文件夹"中).

I want to install NDK to be able to use C/C++ native libraries. Upon trying to install the NDK, i get an error saying I do not have enough disk space in my C: Drive (because the download location is to the Temp Folder).

我尝试更改系统变量中的临时路径,但ndk仍下载到C:\ Users \ User \ Appdata \ Local \ Temp \ PackageOperation02.

I've tried changing the temp path in the system variables but the ndk still downloads to C:\Users\User\Appdata\Local\Temp\PackageOperation02.

然后我去了项目结构来更改Android NDK位置,但是在尝试选择ANY文件夹作为我的NDK位置时,我收到一条错误消息,提示"NDK不包含任何平台".

I then went to the project structure to change the Android NDK Location, but upon trying to choose ANY folder to be my NDK location, I get an error saying "NDK does not contain any platforms".

对于此或为什么下载位置位于Temp文件夹的帮助,将不胜感激.

Help for either that or why the download location is to the Temp folder would be appreciated.

推荐答案

对于2021年看到这一点的人:

For people seeing this in 2021:

自r19起,Android NDK的 platform 目录已过时.NDK团队在r21中将其完全删除.这是最近的更改,当您选择r21或更高版本并尝试应用它时,Android Studio IDE的稳定版本(至少在Mac上是这样)仍在寻找 platform 目录.IDE给出错误"NDK不包含任何平台."

The Android NDK's platform directory has been obsolete since r19. The NDK team removed it altogether in r21. This was a recent change and the stable version of the Android Studio IDE (at least on Mac) is still looking for the platform directory when you select an r21 or higher version and try to Apply it. The IDE gives the error "NDK does not contain any platforms."

在更新Android Studio之前,一种解决方法是自己编辑 local.properties 文件,如下所示:

Until Android Studio is updated, a fix is to edit the local.properties file yourself, like so:

ndk.dir=/Users/[username]/Library/Android/sdk/ndk/22.0.7026061
sdk.dir=/Users/[username]/Library/Android/sdk

这篇关于NDK不包含任何平台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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