This question already has an answer here:
Can anyone tell me why I am receiving this error? I have downloaded a series of projects from GitHub for a Udacity course. Since there are about 50 or 60 projects (Exercises and Solutions) in the repo, I presume it has to do with the fact that each is an individual project on its own. I do not have a problem usually when I fork a repo and clone it locally.
I have read other posts about uninstalling and reinstalling ndk in the sdk. But I really want to know why this is happening and how I can fix without blindly uninstalling and re-installing. Any help is appreciated. Thanks.
Android Studio -> Preferences -> System Settings -> Android SDK -> SDK Tools -> Unselect NDK -> Apply button.
It works fine for me.
It's Because of NDK Version You are selected Follow the steps which will help you to resolve
If you want to use NDK then Update the Gradle Plugin
In build script change Dependecies
if you are unaware of the NDK then simply disable it by selecting preferences>System settings>android sdk>Select SDK Tools > uncheck NDK there
Rebuild the project it works just fine
Happy Coding <3
Updating the Android Gradle plugin is definitely the preferred solution. However, if for whatever reason you can't do that, it's easy to simply "fix" the error without downloading, copying, or symlinking anything, by just creating an empty directory:
$ANDROID_HOME
points to the root of the Android SDK installation. On MacOS, replacelinux-x86_64
withdarwin-x86_64
. Usewindows-x86_64
on Windows.Ok after looking around the solution was to remove the NDK designation from my preferences.
Android Studio -> Preferences -> System Settings -> Android SDK -> SDK Tools -> Unselect NDK -> Apply button.
Project and Gradle compiled fine after that and I was able to move on with my project work.
As far as why this is happening, I do not know but for more info on NDK check out: https://developer.android.com/ndk/
I will go back and enable these libraries but for now, I am just glad I can move on with my work. :)
for me, upgrade the Android Gradle plugin version to 3.2+ works.
If you don't want to update your gradle plugin you can do this. Download one of the older NDK releases, e.g. r17c. Open downloaded NDK archive, go to toolchains directory and copy missing toolchain folders to toolchains folder of your currently used NDK. In my case the folders I had to copy were
mipsel-linux-android-4.9
andmips64el-linux-android-4.9
.