window平台下 Eclipse Ndk开发中的Method 'NewStringUTF' could not be resolved问题
2015-09-04 19:24
666 查看
最近需要用到android的ndk,但是在eclipse中,一直提示Method 'NewStringUTF' could not be resolved(方法“NewStringUTF”无法被解析)。可问题是,jni.h等一系列的依赖库,都已经导入了,并且也能正常的使用build来编译出动态库文件。但是无奈的就是eclipse的cdt,仍旧会不停的提示这类的错误,导致整个项目没办法编译过去。
后来,我先问了baidu,然后又问了google,最终折腾了半天也没很好解决这个问题的办法。
最后还是让我在这里找到了答案:
http://stackoverflow.com/questions/15899813/eclipse-method-newstringutf-could-no
原文如下:
具体操作如下:
Go to the project's Properties -> C/C++ General -> Code Analysis. Click the "Use project settings" radio button (or "Configure Workspace Settings..." button).
Disable (uncheck) the "Method cannot be resolved" checkbox. Click "Apply," "OK." Then for your project, refresh, clean, refresh, build.
<span style="font-family:SimSun;font-size:14px;"></span>项目右键->属性->c/c++常规->Code Analysis,选择"Use project settings" 中的方法无法被解析(Method cannot be resolved)取消选择,应用->确定,然后刷新、清理、刷新、build项目。
搞定。
版权声明:本文为博主原创文章,未经博主允许不得转载。
最近需要用到android的ndk,但是在eclipse中,一直提示Method 'NewStringUTF' could not be resolved(方法“NewStringUTF”无法被解析)。可问题是,jni.h等一系列的依赖库,都已经导入了,并且也能正常的使用build来编译出动态库文件。但是无奈的就是eclipse的cdt,仍旧会不停的提示这类的错误,导致整个项目没办法编译过去。
后来,我先问了baidu,然后又问了google,最终折腾了半天也没很好解决这个问题的办法。
最后还是让我在这里找到了答案:
http://stackoverflow.com/questions/15899813/eclipse-method-newstringutf-could-no
原文如下:
I had this issue. Based on my "solution," it seems to be something funny going on in Eclipse, since I had another project open with (as far as I was able to tell) the exact some properties, paths, etc., besides for being labeled a Library Project. Just by observing the corresponding struct in jhi.h, the callback prototypes are all there! Ctrl-click the include statement and Eclipse will even link you the reference! Go to the project's Properties -> C/C++ General -> Code Analysis. Click the "Use project settings" radio button (or "Configure Workspace Settings..." button). Disable (uncheck) the "Method cannot be resolved" checkbox. Click "Apply," "OK." Then for your project, refresh, clean, refresh, build. There must have been something I did differently in creating the new project. Or maybe it was because of the locations of the projects, or the fact that the previous was a Library. Maybe it really is an Eclipse bug? For reference, I'm using ADT v21.1.0-569685 and NDK r8e for Windows。
具体操作如下:
Go to the project's Properties -> C/C++ General -> Code Analysis. Click the "Use project settings" radio button (or "Configure Workspace Settings..." button).
Disable (uncheck) the "Method cannot be resolved" checkbox. Click "Apply," "OK." Then for your project, refresh, clean, refresh, build.
<span style="font-family:SimSun;font-size:14px;"></span>项目右键->属性->c/c++常规->Code Analysis,选择"Use project settings" 中的方法无法被解析(Method cannot be resolved)取消选择,应用->确定,然后刷新、清理、刷新、build项目。
搞定。
版权声明:本文为博主原创文章,未经博主允许不得转载。
相关文章推荐
- javaSE基础编程——排序(冒泡,选择)
- javaSE基础编程——输出10000到100000之间的回文数
- LeetCode (Java) Roman to Integer
- javaSE基础编程——for循环(输入行数,列数,输出对应行列数的*)
- Java_!!_自动装箱和自动拆箱
- java连接Mysql数据库:
- spring注解
- Windows下使用Hadoop2.6.0-eclipse-plugin插件
- Java学习之equals和==的区别
- 【Spring MVC】Spring MVC启动过程源码分析
- java-8大基本类型
- javaSE基础编程——线程同步(模拟火车站售票操作)
- java接口与抽象类的区别总结
- Java_jdbc 基础笔记之二 数据库连接
- SPRING中的线程池ThreadPoolTaskExecutor
- Java关键字final、static使用总结
- javaSE基础编程——线程同步
- java.util.Date、java.sql.Date、java.sql.Time、java.sql.Timestamp区别和总结
- JAVA里面的IO流(二)方法1、输入流
- javaSE基础编程——自定义线程同步