首页 > 代码库 > android eclipse NDK 测试hello-jni ,HelloJni/jni/hello-jni.c提示“Method 'NewStringUTF' could not be resolved”
android eclipse NDK 测试hello-jni ,HelloJni/jni/hello-jni.c提示“Method 'NewStringUTF' could not be resolved”
如图1
图1
问题:
方法 NewStringUTF 不能被 eclipse定位(鼠标放在该方法上,ctrl + 左键,跳出一些包含 该方法的文件,看图2)
解决思路:(具体思路看下文,参考中“推荐”)
参考网上其他人的解决方案,基本2类:
1. 去警告-> 看下图3;
2. 找到错误方法所在文件位置(图3),包含进 项目属性(propertities -> C/C++ General -> Paths and Sysmbols -> include -> add -> 看下图4
参考:
Eclipse Ndk开发中的Method ‘NewStringUTF‘ could not be resolved问题 - 开源中国社区
http://www.oschina.net/question/95475_89610
android - Eclipse - Method NewStringUTF() could not be resolved - Stack Overflow
http://stackoverflow.com/questions/15899813/eclipse-method-newstringutf-could-not-be-resolved#
Android: Type Method ‘NewStringUTF‘ could not be resolved - 新征程的日志 - 网易博客
http://rzwwd.blog.163.com/blog/static/387040642013126113941766/
Android NDK *** could not be resolved_老子_新浪博客
http://blog.sina.com.cn/s/blog_7b83134b0101boel.html 推荐
Android NDK JNI, Method ‘xxx‘ could not be resolved - 开源中国社区
http://www.oschina.net/question/1987532_162259?sort=time
图2
图3
图4
图5
android eclipse NDK 测试hello-jni ,HelloJni/jni/hello-jni.c提示“Method 'NewStringUTF' could not be resolved”