WISHY
WISHY

Reputation: 11999

Android NDK location not found android studio on Mac?

I recently downloaded Android Studio 3.5.1. Have also downloaded all the SDK tools enter code here

Error I am getting

enter image description here

this is the android sdk folder content

enter image description here

How do I resolve this?

Upvotes: 1

Views: 5565

Answers (3)

Dan Albert
Dan Albert

Reputation: 10499

Remove the ndk.dir line from your build.gradle. That's the older method of specifying the NDK to use, and that path is wrong for the NDK you've installed.

AGP 3.5 allows you to install multiple NDKs simultaneously (if you check the "show package details" box you'll see that "NDK (Side by side)" expands) and select which one to use in your build.gradle with android.ndkVersion.

You can continue using ndk.dir for now, but it's deprecated and there isn't much reason to.

See https://developer.android.com/studio/projects/install-ndk for more information.

Upvotes: 2

WISHY
WISHY

Reputation: 11999

The issue was the path only. Apparently android studio downloaded ndk as Library/Android/sdk/ndk/20.0.5594570/allfiles I had to rename the ndk folder to ndk-bundle and moved the subfolder files to ndk folder.

Upvotes: 1

Movses Arakelyan
Movses Arakelyan

Reputation: 64

Try like this. /your/path/Android/sdk/ndk/20.0.5594570

But in case you are creating a native application using Android Studio, I think you should not locate for your ndk path manual.

Upvotes: 2

Related Questions