2

After updated Android studio from 3.4.2 to 3.5 I see the following warning message on the Build log messages.

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

I have the following in by 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.

I have seen the following threads but it does not help

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.

Result: The warning message still persists

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

Comment: I already have the following on my local.properties

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

Result: The warning message still persists

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

Comment: I already have this configuration on my build.gradle

Result: The warning message still persists

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.

comment: I did as suggested.

Result: The warning message still persists

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

Code Wizard
  • 319
  • 3
  • 8

1 Answers1

-1

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

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

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

Edit #1

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

enter image description here

shizhen
  • 12,251
  • 9
  • 52
  • 88