Surprise behavior of eclipse for C files while using JNI, Why so?(使用 JNI 时 C 文件的 eclipse 行为令人惊讶,为什么会这样?)
问题描述
我正在开发一个使用大量 JNI 代码的 Android 应用程序.最近(从过去的 2-3 天开始,我对 eclipse 的意外行为感到非常恼火)只要我打开我的 .c,它就会向我显示模糊的错误文件...但是,如果我关闭并重新打开项目,错误就会消失.请参阅随附的屏幕截图.是不是因为我刚刚更新了我的eclipse安装(只是更新了eclipse插件,我还在我的旧Indigo上)...
I am developing an Android App in which I use lot of JNI Code.. Recently (from last 2-3 days I am really annoyed by surprise behavior of eclipse) it shows me vague errors as soon as I open my .c file... However errors disappear if I close and reopen the project. See the secreen shot attached. Is it because I just update my eclipse installation (just update of eclipse plugins, I am still on my old Indigo)...
这是一个 eclibse 错误还是我的设置有问题?
Is it an eclibse bug or something wrong with my setup ?
解决了????我尝试了一切,但注意到可能会改变 eclipse 的行为.此时我知道我肯定错误地弄乱了项目设置,因为 eclipse 在同一工作区的其他项目中表现良好.所以我手动重新创建了项目,最终解决了我的问题......虽然问题仍然开放以获得有价值的答案,但我想我很快就会得到一些好的答案......
Solved ???? I tried everything but noting could change the behavior of eclipse.. By this time I knew that I have certainly messed with the project Settings by mistake, since eclipse was behaving well in other projects of same workspace. So I recreated the project manually and finally that solved myproblem...Though the Question is still open for valuable answers I think soon I will get some good answers..
更新即使是 eclipse 4.2 版本也有这个问题.. #frustrating
UPDATE Even eclipse 4.2 release also has this problem.. #frustrating
推荐答案
我发现删除项目然后将项目重新导入工作区可以解决问题.但是我也开始知道从项目树中删除 .cproject 文件也可以解决这个问题.修复 Eclipse 首选项中的 NDK 路径 (Window -> Preferences -> Android-> NDK) 也可以解决问题.
I found that deleting the project and than reimporting the project to workspace solves the problem. However I also came to knew that deleting .cproject file from the project tree can also fix this problem. Fixing the NDK path (Window -> Preferences -> Android-> NDK) in Eclipse preferences may also solve the problem.
解决方案 2 在少数情况下可能会起作用...
Solution 2 Which may work in few cases...
- 右键单击项目.
- 选择 Android 工具 -> 修复项目属性
这篇关于使用 JNI 时 C 文件的 eclipse 行为令人惊讶,为什么会这样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:使用 JNI 时 C 文件的 eclipse 行为令人惊讶,为什么会这样?
基础教程推荐
- 如何对 HashSet 进行排序? 2022-01-01
- 由于对所需库 rt.jar 的限制,对类的访问限制? 2022-01-01
- 如何强制对超级方法进行多态调用? 2022-01-01
- 首次使用 Hadoop,MapReduce Job 不运行 Reduce Phase 2022-01-01
- 在螺旋中写一个字符串 2022-01-01
- 如何使用 Eclipse 检查调试符号状态? 2022-01-01
- Spring Boot Freemarker从2.2.0升级失败 2022-01-01
- 如何使用 Stream 在集合中拆分奇数和偶数以及两者的总和 2022-01-01
- 如何在不安装整个 WTP 包的情况下将 Tomcat 8 添加到 Eclipse Kepler 2022-01-01
- Java 中保存最后 N 个元素的大小受限队列 2022-01-01