2021.04.08

cmake
This commit is contained in:
tt committed 2021-04-08 18:20:51 +08:00
1 parent e9a718484b
commit 85944ed6ce
4 files changed
+72 -6

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
//
// Created by Administrator on 2021/4/8.
//
#include <jni.h>
#include <string>
extern "C"
JNIEXPORT jstring
JNICALL
Java_com_tt_ttutils_jni_NDKTools_getStringFromNDK(
JNIEnv *env, jobject /* this */) {
std::string hello = "Hello from C++";
return env->NewStringUTF(hello.c_str());
}
@@ -2,7 +2,8 @@ package com.tt.ttutils.jni;
public class NDKTools {
static {
System.loadLibrary("NDKTools-jni");
// System.loadLibrary("NDKTools-jni");
System.loadLibrary("native-lib");
}
public static native String getStringFromNDK();