Set Build Path in Eclipse for Ndk Program

Set Build path in Eclipse for ndk program

//goto Preference Android NDK and choose your ndk location

Sample Image

or

in your hidden .bashrc file add this below line

export NDK_PATH=/home/padmakumar/android-ndk-r7b

Eclipse Juno ADT plugin NDK path removed?

you need re-install the ADT-23.0.4.zip (Don't forget select the Android Native Development Tools);

Please have a look at this Android SDK page.

You should:

  1. Download ADT-23.0.4.zip.
  2. Just re-install.
  3. Restart.
  4. You will see Eclipse > Window > Android > NDK tag.

How to change built-in C/C++ paths pointing to a deleted android-ndk-r9 installation?

Where is the setting coming from?

It appears the information is held in the project's pathInfo file. Below, the project is a sample JNI project called AndroidPrng.

$ cat /Users/jww/Eclipse/.metadata/.plugins/com.android.ide.eclipse.ndk/AndroidPrng.pathInfo 
t,1421045575000
i,/opt/android-ndk-r9/sources/cxx-stl/stlport/stlport
i,/usr/local/cryptopp/android-armeabi/include
i,/opt/android-ndk-r9/sources/cxx-stl/system/include
i,/usr/local/cryptopp/android-armeabi/include/cryptopp
i,jni
i,/opt/android-ndk-r9/platforms/android-14/arch-arm/usr/include
i,/usr/local/cryptopp/android-x86/include
i,/usr/local/cryptopp/android-x86/include/cryptopp
i,/opt/android-ndk-r9/platforms/android-14/arch-x86/usr/include
i,/usr/local/cryptopp/android-mips/include
i,/usr/local/cryptopp/android-mips/include/cryptopp
i,/usr/local/cryptopp/android-armeabi-v7a/include
i,/usr/local/cryptopp/android-armeabi-v7a/include/cryptopp
i,/opt/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.6/include
i,/opt/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.6/include-fixed
i,/opt/android-ndk-r9/platforms/android-14/arch-mips/usr/include
d,__STDC__,1
d,__INT64_MAX__,9223372036854775807LL
d,__LDBL_HAS_QUIET_NAN__,1
d,__WINT_TYPE__,unsigned int
d,__ORDER_LITTLE_ENDIAN__,1234
d,__DEC64_MAX_EXP__,385
d,__UINT_LEAST32_TYPE__,unsigned int
d,__UINT_FAST64_TYPE__,long long unsigned int
d,__GXX_WEAK__,1
...

I've grepped the following directories ... "My Eclipse workspace, ~/.eclipse, " ...

There were two problems here. First, the project is located on my desktop, and not my workspace directory. Second, the 100's of entries in the log files under org.eclipse.cdt.ui drowned out the entries 15 entries for com.android.ide.eclipse.ndk.

So, before you grep, perform:

rm Users/jww/Eclipse/.metadata/.plugins/org.eclipse.cdt.ui/*.log

That will produce manageable grep results.


And how do I change it?

Exercise left to the reader.

You can edit by hand; or you can delete it and Eclipse will recreate it with the new NDK-related paths.

Setting up Cygwin + Android NDK + cocos2Dx to work with Eclipse

Thank you to everyone who commented! :)

This is what I ended up doing.

  1. Reinstall Cygwin : When you get to the select packages to install page, make sure to find DEVEL and change the install action from default to install. I know its a lot of megs but it's easier than combing through it. If you do want to comb through it and get only what you need, I suggest using this website: Installing a c++ compiler for windows
  2. Make your paths simple : Like user2359247 suggested.
  3. Finally run the create_android.bat, open your android project. Keep the path location of your build_native.sh file in mind and open your cygwin terminal.
  4. Navigate to the path in cygwin, and run the file with sh build_native.sh: At this point everything was quite smooth sailing.

NOTE:

Also I kept using my version of ndk which is r9 instead of r8 in the tutorial, it didn't give me any hiccups.

Thank you SO!



Related Topics



Leave a reply



Submit