Eclipse ADT - Unresolved inclusion jni.h

后端 未结 4 1004
予麋鹿
予麋鹿 2021-02-01 10:47

On my Windows platform, I have the latest version of adt bundle (20140321) and ndk (r9d) installed. The installation is as clean as it gets. The environment variables NDK_ROOT,

4条回答
  •  清酒与你
    2021-02-01 11:35

    I solved this for adt-bundle-windows-x86_64-20140321:

    1. No any environment variables is set, just pointed NDK location under Preferences > Android > NDK.
    2. I created new, clean Eclipse workspace.
    3. Deleted from my project with C++ code next files/folders:

    .settings
    .classpath
    .cproject
    .project
    project.properties

    1. Eclipse > New > Other > Android > Android Project from Existing Code > then point folder with your project, let Eclipse detect it, check "Copy project into workspace" and click Ok/Next, whatever.
    2. Clean project.
    3. Right click on project > Android Tools > Add native support
    4. Rebuild, possibly restart workspace.

    Also this solved issue with Eclipse 4.3 previously ignored build system and user defined compiler flags. Now macros folding dependent on this flags etc works fine.

    If more general - NDK plugin can properly define for you right includes and anything other required to work fine, but you need to clean your project from broken crap.

提交回复
热议问题