Search code examples
androidandroid-ndkjava-native-interface

Cannot open Android NDK project


I have a project on the host (Windows 7 x64, Eclipse Juno, ADT 21.1, CDT 21.1, NDK r8e). When i moved the project to my laptop, it turned out that he was not properly open. C and Java source code, and configuration are handled correctly, but in the .CPP file and .H file (jni/ folder) i have error "undefined reference jni.h".

Although the system will check the settings for installing VMware virtual system, the same situation. Systems are configured identically, environment variables are set. New projects created on a laptop or a VMware going normally.


Solution

  • From the image you sent in the comment, it seems that you are using Eclipse for Android development. Try to download the java version and use that one instead (for instance, the same used in you host: Eclipse Juno, ADT 21.1, CDT 21.1, NDK r8e).

    I had a similar problem and it was due to the Eclipse version.