0

I moved my Android SDK (and NDK) when my hard drive failed.

In my working project, I updated local.properties to reflect these changes in the variables ndk.dir and sdk.dir, yet when I run ./gradlew clean --info on the command line from within my project directory, gradle gives me a failure at the following command:

<old_ndk_path>/ndk-build NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=<oldprojdir>/app/src/main/jni/Android.mk APP_ABI=armeabi NDK_ALL_ABIS=armeabi NDK_DEBUG=1 APP_PLATFORM=android-23 NDK_OUT=<oldprojdir>/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=<oldprojdir>/app/build/intermediates/ndkBuild/debug/lib clean

It's no wonder that the task fails, since no executable exists at that path now, but how can I get gradle to make use of the new NDK path? And how can I make it use the new project directory?

Jon Goodwin
  • 9,053
  • 5
  • 35
  • 54
JellicleCat
  • 28,480
  • 24
  • 109
  • 162
  • What OS are you using ? Take a quick look at this first (environmental variables) NDK_HOME=C:\Android\sdk\ndk-bundle NDK_MODULE_PATH=C:\Android\sdk\ndk-bundle (are you using Android Studio ? if so put in the tag.. {command line only ?})..See https://stackoverflow.com/questions/40474050/android-studio-where-to-install-ndk-file-downloaded-it-in-zip/40475804#40475804 – Jon Goodwin Sep 07 '17 at 02:35
  • https://stackoverflow.com/a/39159450/5022983 – Sabish.M Sep 07 '17 at 09:51
  • @Sabish.M : Thanks. I tried that too, but to no effect. – JellicleCat Sep 07 '17 at 22:31
  • @JonGoodwin : My OS is Linux. Looks like setting the env vars didn't get me what I needed, but deleting /.gradle did. – JellicleCat Sep 07 '17 at 22:33

1 Answers1

0

Delete the <projdir>/.gradle directory and try again.

JellicleCat
  • 28,480
  • 24
  • 109
  • 162