Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse error: invalid path for ndk?

I want to integrate some c code with Android so as first step I has to specify NDK path in Native Development node. But when I specify NDK path it gives error Invalid path for NDK I googled but could not find some solution. Am I missing some step.

SDK and NDK are in the same folder and SDK path working fine.

Please help

I have installed

  • make-3.81
  • nawk-2007.10.23-setup
  • Cygwin
  • ADT-17.0.0
  • Sequoyah
  • android-ndk-r7b-windows.zip (Extracted) enter image description here

EDIt:

I just check the link and came to know that it could be GCC absent problem .How do I check that if its GCC problem or not , or How can I check if GCC is installed or not?

like image 645
Azhar Avatar asked Mar 30 '12 03:03

Azhar


2 Answers

Mmm... weird error. Keep in mind that in order to use the NDK, the SDK should be working in perfect way before you start with the NDK, said that, I suggest you to try the following:

1- Be sure you have the pre-requisites:

  • For all development platforms, GNU Make 3.81 or later is required. Earlier versions of GNU Make might work but have not been tested.
  • A recent version of awk (either GNU Awk or Nawk) is also required.
  • For Windows, Cygwin 1.7 or higher is required. The NDK will not work with Cygwin 1.5 installations.

2- Start from scratch again by deleting any NDK references such as the settings on eclipse, paths, folders, zips, etc.

3- Be sure you have updated to the latest Android SDK and ADT Tools. Using the Help->Check for Updates Menu in ECLIPSE and then be sure you have all the things are up to date on the Android SDK Manager.

4- I see a "D:/" on your question, so you're using a Windows PC... it must be a Windows XP (32-bit) or Vista (32- or 64-bit). Be sure to get the Windows version (http://dl.google.com/android/ndk/android-ndk-r7b-windows.zip), and when you have unzipped that ndk, rename the folder to "ndk". You can put it next to where your SDK's folder is, it should not matter.

5- Open Eclipse, and give it the path to the NDK, and see what happens.

Good luck!

like image 72
Oscar Salguero Avatar answered Sep 17 '22 18:09

Oscar Salguero


I exhuasted to solve this problem "Invalid path for android SDK" but it got solved at last. Here is how it got solved. My system specs: P4 3.2 GHz, Windows 7 32-bit, Eclipse Standard Edition 4.3 (Kepler). Other supporting softwares: MinGW with GNU make 3.81.

Problem (first the problem I faced and then the solution): I downloaded Android NDK latest version from "developer.android.com/sdk/ndk/index.html" which was "android-ndk-r9-windows-x86.zip". Then I extracted it in C:\ directory then I added a ";C:\android-ndk-r9" in my PATH variable. Then I installed "Sequoyah Android Native Code Support" using eclipse "install new software" option (Help ➤ Install New Software➤type "Indigo - http://download.eclipse.org/releases/indigo" in the work with field ➤ go to Mobile and Device Development category and select Sequoyah Android Native Code Support). Then I went to eclipse menu "Window ➤ Preferences ➤ Android ➤ Native Development" and entered "C:\android-ndk-r9" in the NDK location and got error " Invalid path for NDK".

Solution: I search exhaustively on internet and tried different solution but the solution worked for me was:

I downloaded the older version of NDK ( download link: "dl.google.com/android/ndk/android-ndk-r7c-windows.zip" ) and extracted in C:\ directory using winrar and updated the PATH in environment variable to point to the new NDK version 7c. When now I entered the path it accepted. No error appeared. the problem is Sequoyah doesn't accept new version because it has not updated since 2011 ( I'm not sure) Note1: for Linux users download link: "dl.google.com/android/ndk/android-ndk-r7b-darwin-x86.tar.bz2" Note2: you can change the version in the link according to your requirement for example "dl.google.com/android/ndk/android-ndk-r4bc-windows.zip" to download version 4b. Thanks.

like image 38
Jamil Ahmad Avatar answered Sep 20 '22 18:09

Jamil Ahmad