Android studio 3.5:NDK分辨率结果:项目设置:Gradle模型版本= 5.4.1,NDK版本为UNKNOWN [英] Android studio 3.5: NDK Resolution Outcome: Project settings: Gradle model version=5.4.1, NDK version is UNKNOWN

查看:703
本文介绍了Android studio 3.5:NDK分辨率结果:项目设置:Gradle模型版本= 5.4.1,NDK版本为UNKNOWN的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

NDK分辨率结果:项目设置:Gradle模型版本= 5.4.1, NDK版本为未知

NDK Resolution Outcome: Project settings: Gradle model version=5.4.1, NDK version is UNKNOWN

我正在使用以下已安装的

I am using the following installed

Build-tools: 29.0.2 

NDK side by side: 20.0.5594570  

NDK: 20.0.5594570

我在build.gradle

classpath 'com.android.tools.build:gradle:3.5.0'

注意::即使我收到此警告消息,构建也已成功完成,没有任何问题,因此这不是阻塞问题.无论如何,我想摆脱这个警告.

Note: Even though I am receiving this warning message, the build got succeeded without any problem so this is not a blocking issue. Anyway I want to get rid of this warning.

我已经看过以下主题,但无济于事

1.建议1:建议使用Import项目(Gradle,Eclipse等)打开项目

1. Suggestion 1: suggests to opening project using Import project (Gradle, Eclipse, etc.)

评论:我通过上述选项重新导入了该项目,但没有帮助.还尝试删除构建文件夹,重新启动无效的缓存等.

Comment: I reimported the project via the said option, but did not help. Also tried deleting build folders, restart-invalidate caches etc.

结果:警告消息仍然存在

2.建议2:您只需打开local.properties&将ndk.dir路径更改为您的NDK路径.

2. Suggestion 2: You just need to open local.properties & change ndk.dir path to your NDK path.

评论:我的local.properties

ndk.dir=C\:\\Users\\admin\\AppData\\Local\\Android\\Sdk\\ndk-bundle
sdk.dir=C\:\\Users\\admin\\AppData\\Local\\Android\\Sdk

结果:警告消息仍然存在

3.建议3:在同步项目android studio将使用gradle-5.4.1

3. Suggestion 3: Go to your build.gardle(Project) and then change the classpath of gardle to 3.5.0 after Sync project android studio will use gradle-5.4.1

注释:我在build.gradle

结果:警告消息仍然存在

4.建议4:如以下回答之一所建议,请从给定链接下载SDK,并将其设置在单独的文件夹中.

4. Suggestion 4: As suggested by one of the answer below, download the SDK from the given link and setup it in a separate folder.

评论:我按照建议做了.

结果:警告消息仍然存在

尝试了我在不同主题/评论/答案中发现的所有上述建议后,似乎没有任何效果.

After trying all of the above suggestions that I found on different threads/comments/answers, nothing seems working.

推荐答案

下载单独的NDK,例如 https://dl.google.com/android/仓库/android-ndk-r20-windows-x86_64.zip

Download a separate NDK, e.g. https://dl.google.com/android/repository/android-ndk-r20-windows-x86_64.zip

然后将其解压缩到目录中,例如C\:\\Users\\admin\\AppData\\Local\\Android\\ndk,然后将ndk.dir指向该目录.即

Then unzip it to a directory, e.g.C\:\\Users\\admin\\AppData\\Local\\Android\\ndk, and point your ndk.dir to it. i.e.

ndk.dir=C\:\\Users\\admin\\AppData\\Local\\Android\\ndk\\android-ndk-r20-windows-x86_64
sdk.dir=C\:\\Users\\admin\\AppData\\Local\\Android\\Sdk

或者,复制新下载的NDK的全部内容,并覆盖内容 ndk-bundle目录

Or, copy the whole content of the newly downloaded NDK and overwrite the content inside ndk-bundle directory

编辑#1

或者尝试导入该项目,而不是直接打开它,请参见下文:

Or try to import the project rather than directly open it, see below:

这篇关于Android studio 3.5:NDK分辨率结果:项目设置:Gradle模型版本= 5.4.1,NDK版本为UNKNOWN的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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