From 4913a42eb95a786de6fc1efb392d1a50ce923ab4 Mon Sep 17 00:00:00 2001 From: fjh Date: Tue, 15 Jun 2021 10:33:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=9A=82=E6=97=B6=E4=B8=8D?= =?UTF-8?q?=E7=94=A8=E7=9A=84cpp=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/cpp/CMakeLists.txt | 6 ------ entry/src/main/cpp/hello.cpp | 13 ------------- 2 files changed, 19 deletions(-) delete mode 100644 entry/src/main/cpp/CMakeLists.txt delete mode 100644 entry/src/main/cpp/hello.cpp diff --git a/entry/src/main/cpp/CMakeLists.txt b/entry/src/main/cpp/CMakeLists.txt deleted file mode 100644 index 805b6af..0000000 --- a/entry/src/main/cpp/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -# the minimum version of CMake. -cmake_minimum_required(VERSION 3.4.1) -project(HM_LogUtils_master) - -add_library(hello SHARED hello.cpp) -target_link_libraries(hello) \ No newline at end of file diff --git a/entry/src/main/cpp/hello.cpp b/entry/src/main/cpp/hello.cpp deleted file mode 100644 index 9265c7a..0000000 --- a/entry/src/main/cpp/hello.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include -#include - -extern "C" JNIEXPORT jstring JNICALL -Java_com_huawei_view_testnative_slice_MainAbilitySlice_stringFromJNI(JNIEnv* env, jobject obj) { - std::string hello = "Hello from JNI C++ codes"; - int len = hello.size(); - jchar res[len]; - for (int i = 0; i < len; i++) { - res[i] = (jchar) hello[i]; - } - return env->NewString(res, len); -} -- Gitee