0

In my Android project I can see all android java symbols in my java code. Now when I do "System." then it suggests all the functions it supports. I can select say "LoadLibrary". or if I use a symbol then, eclipse tell me which java class to import.

But, in my ndk project (it generates .so and then also jar both), in jni cpp file, I can't see symbols if I do "env->". It just becomes like ordinary text editor without any hint.

any solution or explain why?

test test
  • 85
  • 1
  • 4
  • see http://stackoverflow.com/questions/9337757/unresolved-inclusion-error-with-eclipse-cdt-for-c-standard-library-headers. – V-master Nov 18 '15 at 14:51
  • It is mostly problem with Windows version of Eclipse CDT. To make symbols available, you need to add paths to c/c++ symbols, probably change compiler settings to linux-gnu/android , and rebuild c/c++ index on project. Sometime it works, sometimes don't. – V-master Nov 18 '15 at 14:57
  • it is ubuntu. and @V-master it does not solve the problem. It is not the C++ project. if I create a c++ project in the same workspace then, It can see all the symbols and shows if there is any mistake. But, I have created android project with jni folder which contains native code. I have java code too. Any error in java it shows it visually in ide but, I can't see anything with jni. it does not report problem or does not help in symbol hint either. I even tried android studio. – test test Nov 26 '15 at 18:02
  • for jni code in eclipse, you need to have `Android Native Developer Tools` plugin installed and with its usage `right click on project -> Android tools -> Add native support`. This way it will have double nature, Java and c/c++. Convert to c/c++ project should also work, but i did not tried it so i don't know how it looks. Here is about NDK plugin: http://tools.android.com/recent/usingthendkplugin And here about converting project: https://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-development/ – V-master Nov 27 '15 at 21:42

1 Answers1

0

rather than android project when I converted to C++ project then it worked by adding symbols manually. However after sometime java files stopped seeing java symbols.

test test
  • 85
  • 1
  • 4