使用NDK时未解决包含错误 [英] Unresolved inclusion error while using NDK

查看:164
本文介绍了使用NDK时未解决包含错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我使用的是Android NDK,但是.c文件在JNI文件夹中显示未解决的包含错误,如图所示:请帮我解决这个问题。我已经尝试了几乎所有我可以在互联网上找到但无法解决它。对于C / C ++项目,我可以使用构建路径\\路径和符号选项来解决包含,但对于一个android项目,此选项在项目属性中不可用。


I am using Android NDK but the .c file in the JNI folder is showing the error of Unresolved inclusion as shown in the image: Kindly help me in solving this issue. I have tried almost everything I could find on internet but unable to solve it. For a C/C++ project I can use the build path\paths and symbols option to solve the inclusion but for an android project, this option is not available in project properties.

推荐答案

这是ADT插件中的一个错误(或者说,它听起来像是与新的CDT for Eclipse不兼容)在Windows上记录在这里:

This is a bug in the ADT plugin (or rather, it sounds like an incompatibility with the newer version of CDT for Eclipse) on Windows documented here: http://code.google.com/p/android/issues/detail?id=33788

有一个新版本的预览可以解决这里所述的问题: http://tools.android.com/download/adt-21-preview#TOC-安装

There's a preview of a new version which fixes the problem described here: http://tools.android.com/download/adt-21-preview#TOC-Installation

以下是我需要解决的问题:

Here's what I needed to do to fix the problem:


  1. 在SDK Manager的选项中启用预览工具,然后安装SDK工具的预览版本。

  2. 使用上面链接的预览说明,在Eclipse中安装ADT和NDK插件的预览版本。

  3. 重新创建我的项目我可以重新执行添加本地支持步骤(显然需要修复才能正常工作)。

很可能通过编辑适当的项目文件而不是重新创建完成#3,但由于我处于开发初期阶段,我没有尝试过。

It's probably possible to accomplish #3 by editing appropriate project files rather than re-creating, but since I'm in early stages of development I didn't experiment with that.

这篇关于使用NDK时未解决包含错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆