When creating an NDK project, I got an error in the .cpp file,
Method 'NewStringUTF' could not be resolved
As shown in the figure:
I saw a lot of solutions online
Right-click on the project->Properties->c/c++ General->Code Analysis, select "Use project settings" in the method cannot be resolved (Method cannot be resolved) deselect, apply->OK, then refresh, clean, refresh, build project.
Get it done.
Mine didn't succeed after I changed it like this. I cleaned it, ran the generated compiled file, and then restarted Eclipse to succeed.
After restarting, you can run the project, which feels very pitted.
See information (there are many online)
https://stackoverflow.com/questions/15899813/eclipse-method-newstringutf-could-not-be-resolved/16111538
https://blog.csdn.net/lqjun/article/details/50437285
https://blog.csdn.net/brokge/article/details/39929525/
https://www.aliyun.com/jiaocheng/88000.html