5

I have some troubles with eclipse & sequoyah. I wrote a simple app, and without sequoyah it builds successfully. But it falls in emulator, so I decided to use sequoyah for native debugging. And after sequoyah's installation I see that unresolved inclusion don't allow me to build & run the project. Can anybody help me with it? Thanks.

SirHamlet
  • 143
  • 1
  • 2
  • 7

4 Answers4

5

I had to do the following steps to get rid of this warning:

  1. Open Eclipse's Navigator View (so you can see hidden files).
  2. Delete .project and .cproject.
  3. Clean (you might get some errors, but that's normal) and restart Eclipse.
  4. File -> New -> Other -> C/C++ -> Convert to a C/C++ project.
  5. Make sure to select C++ in the Radio button. Also, select the GNU Make (do NOT select the Android Make one!).
  6. Clean the project.
  7. Right click on Project -> Properties -> C/C++ General -> Paths and Symbols. Go to the "Includes" tab and include the folder path for the "include" directory of the desired target (in my case it was "/Developer/AndroidNDK/platforms/android-9/arch-arm/usr/include")
  8. Before clicking on "Ok", check the "Apply to all" checkbox.
  9. Restart Eclipse one last time and the warning should be gone!

Hope it helps.

3

Assuming Android NDK is downloaded and NDK-HOME and Path are set.

Add Android NDK reference in Eclipse ->Windows->Preference->Android->NDK here set a path of NDK folder Restart Eclipse Right click on project ->Android Tools->Add Native Support

It will add all relevant things automatically.

Ur Problem will solve :)

Vinayak
  • 6,056
  • 1
  • 32
  • 30
1

jni.h is an included part of the NDK, the fact that eclipse wont see it is that it doesn't know where it is.

in the c++ properties of your project you should include the NDK includes for your platform located in {ANDROID_NDK}/platforms/android-{version}/arch/arm/usr/include you can get more info on setting your ide here

But I don't think that's your problem, even if eclipse shows you errors, since it's not setup properly it will not provide any help..

post your errors from logcat maybe we can help?

Tancho
  • 1,581
  • 3
  • 22
  • 40
  • Yes, I just needed to add `{ANDROID_NDK}/platforms/android-{version}/arch/arm/` to the list of the paths and symbols of my project. Properties - C/C++ General - Paths and symbols - Source location. Thanks! – Maksim Dmitriev Mar 17 '15 at 18:38
1

you need to add jni.h to your project's path.

add following paths to: Project -> Properties -> C/C++ General -> Paths and Symbols -> "Includes" -> GNU C++

${NDK_ROOT}\sources\cxx-stl\gnu-libstdc++\4.8\include

${NDK_ROOT}\platforms\android-9\arch-x86\usr\include

clean your project.

mox
  • 21
  • 2