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);
}
NDK中char*如何转换成jstring
最新推荐文章于 2023-08-12 11:37:39 发布
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);
}