使用JNI时C文件的eclipse的惊喜行为,为什么呢? [英] Surprise behavior of eclipse for C files while using JNI, Why so?

查看:156
本文介绍了使用JNI时C文件的eclipse的惊喜行为,为什么呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个Android应用程序,其中我使用了大量的JNI代码。最近(从过去2-3天,我非常讨厌eclipse的惊喜行为),它显示我模糊的错误,一旦我打开我的.c file ...但是如果我关闭并重新打开项目,则错误消失。看到连接的secreen镜头。是因为我只是更新我的eclipse安装(只是更新eclipse插件,我还在我的老靛蓝)...





这是一个eclibse错误或我的设置有问题吗?



解决????
我尝试过一切,但注意到可能会改变eclipse的行为..这时候我知道我确实搞错了项目设置错误,因为eclipse在同一工作空间的其他项目中表现良好。所以我手动重新创建了这个项目,最后解决了这个问题。虽然问题仍然是有价值的答案,但我想很快就会得到一些很好的答案..



strong> UPDATE
即使eclipse 4.2版本也有这个问题.. #frustrating

解决方案

我发现删除项目,而不是将项目重新导入工作空间来解决问题。但是我也知道从项目树中删除 .cproject 文件也可以解决这个问题。在Eclipse首选项中修复NDK路径(窗口 - >首选项 - > Android-> NDK)也可以解决问题。



解决方案2 哪些可能在少数情况下起作用?


  1. 右键单击项目。

  2. 选择Android工具 - >修复项目属性


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)...

Is it an eclibse bug or something wrong with my setup ?

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..

UPDATE Even eclipse 4.2 release also has this problem.. #frustrating

解决方案

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.

Solution 2 Which may work in few cases...

  1. Right click on the project.
  2. Select Android Tools -> Fix Project Properties

这篇关于使用JNI时C文件的eclipse的惊喜行为,为什么呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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