NDK中char*如何转换成jstringJNIEXPORT jstring JNICALLJava_Test_TestString( JNIEnv *env, jobject obj
NDK中char*如何转换成jstring
JNIEXPORT jstring JNICALL
Java_Test_TestString( JNIEnv *env, jobject obj )
{
char *buf = (char*)malloc(10);
strcpy(buf, "Testing 1");
jstring jstrBuf = (*env)->NewStringUTF(env, buf);
}
