我在Eclipse中有一个Android项目设置,它使用JNI来访问C代码,在我打开其中一个C文件之前一切正常.一旦完成,我得到这些错误:

我尝试了很多东西,包括:
使用JNI时,eclipse对C文件的行为感到惊讶,为什么会这样?
我的NDK路径也设置如下:

有人有解决方案吗?请注意,关闭项目并重新打开会使问题消失但是一旦打开C源文件,问题就会再次出现.另请注意,如果我不打开C文件,项目编译,运行并使用JNI包装器和底层C源就好了.
编辑:
当徘徊到显式的红色错误时,我得到类型jstring之类的消息无法解析.我有点理解问题可能是什么,我不明白的是,为什么只有当我打开源文件时这才是问题?为什么,如果我不在编辑器中打开文件,这是完美的吗?
编辑2:
我忘了提到我在Mac上这样做.
我有一个iPad应用程序的代码,适用于iOS 7以下的任何iOS
UIToolbar* tools = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 75, 44)];
NSMutableArray* buttons = [[NSMutableArray alloc] initWithCapacity:2];
UIBarButtonItem *composeButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCompose target:self action:@selector(toggleDelete:)];
[buttons addObject:composeButton];
UIBarButtonItem *fixedSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
fixedSpace.width = 5;
[buttons addObject:fixedSpace];
UIBarButtonItem* bi = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(touchMe:)];
[buttons addObject:bi];
[tools setItems:buttons animated:NO];
tools.barStyle = -1;
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:tools];
[bi release];
[fixedSpace release];
[composeButton release];
[buttons release];
[tools release];
Run Code Online (Sandbox Code Playgroud)
iOS 7之前的结果是:

在iOS 7上运行时相同的代码结果如下:

由于某种原因,按钮被移动到iOS 7中工具栏的底部.
现在,我可以使用UIBarItem imageInset属性重新定位它们,但这似乎是一种hackish,因为那时我需要检查iOS版本,如果iPad运行iOS 7+,则只需要执行imageInset.我的问题是我是否遗漏了与UIToolbar有关的iOS …
使用案例:
我们有一个iOS应用程序,您可以在iOS设备及其相关的无线接入点之间运行网络测试来测试吞吐量.该应用程序可以很好地获取iOS设备的IP地址,但用户必须输入接入点的IP.
问题:
任务是获取相关接入点的IP地址,并为用户预先填写,从而避免用户干预.
我的方法:
找出接入点的Mac地址/ BSSID.我通过使用Captive Network API来实现这一点.
发出ARP请求以找出与接入点关联的IP.到目前为止,我还没有完成这个任务.Google和SO搜索在这里引领我走向死胡同.以下是一些类似的问题: 如何在iPhone上查询ARP表?和 iPhone上的ARP请求
题:
这样做的正确方法是什么?换句话说,获取iOS设备所连接的接入点的IP地址的最佳方法是什么.
ios ×2
objective-c ×2
android ×1
android-ndk ×1
eclipse ×1
ios7 ×1
ipad ×1
iphone ×1
macos ×1
networking ×1
uitoolbar ×1
wireless ×1