Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't set Android NDK version on Android Studio

When I try setting ndk version on android studio, via project structure -> sdk location, the search box is grayed out. So I went to the local.properties file, and set ndk.dir there. But the issue is that when I do this, android studio can't sync gradle, and it constantly throws me this "SILLY ERROR"

Gradle sync failed: exception during working with external system:

I tried setting system environment variable for the ndk directory, but it still didn't function !!!!!!!

This IDE is frustrating. where should I set my NDK version then ? I stuck and every solution I try online doesn't work.

like image 431
John Code Avatar asked Mar 03 '26 19:03

John Code


1 Answers

The recent version of Android Gradle Plugin expect you to install NDK (side by side) via the SDK Manager, and choose the version for your module in build.gradle:

android {
    …
    android.ndkVersion '19.2.5345600'
}
like image 168
Alex Cohn Avatar answered Mar 05 '26 10:03

Alex Cohn