Android Add Native support - unresolved jni.h, android/log.h etc

后端 未结 4 1079
轮回少年
轮回少年 2020-12-29 12:29

Before today i use Eclipse 3.8 with Sequoyah plugin for Android NDK project. But today i decide to freshen Eclipse to Juno release with SDK and NDK.
I w

4条回答
  •  一向
    一向 (楼主)
    2020-12-29 13:09

    I often solving similar issues that is probably occur when you move or rename the working folder of the project.

    1. No any environment variables required, just pointed NDK location under Preferences > Android > NDK.
    2. Move project outside workspace. Delete from project next files/folders:

    .settings
    .classpath
    .cproject
    .project
    project.properties

    1. Reimport your project. 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 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, and easiest way to do so is reimport project.

提交回复
热议问题