Error: type "JNIENV" cannot be resolved

I am new to Android NDK launching the first hello JNI example. I added the jni folder and added the c file, in which I get an error that some of them are not allowed.

Error

I also convert the project to C / C ++ and add NDK to eclipse as shown below

NSK

But there is still a red line of error in the cpp file, which indicates that some of them cannot be resolved.

Guys help me!

+4
source share
2 answers

I solved this problem to add a project to Native Support.

Follow this approach: -

Android Right-click on the project, then Android Tools, then add root support.

+3
source

, JNIEnv JNIEnv. , .

0

All Articles