!8326 fix java some unused code

From: @yeyunpeng2020
Reviewed-by: 
Signed-off-by:
This commit is contained in:
mindspore-ci-bot 2020-11-18 14:48:27 +08:00 committed by Gitee
commit 337805aa55
5 changed files with 7 additions and 10 deletions

View File

@ -4,7 +4,6 @@ apply plugin: 'maven-publish'
android {
compileSdkVersion 30
buildToolsVersion "30.0.1"
defaultConfig {
minSdkVersion 19
targetSdkVersion 30

View File

@ -32,6 +32,4 @@ public class DataType {
public static final int kNumberTypeFloat16 = 42;
public static final int kNumberTypeFloat32 = 43;
public static final int kNumberTypeFloat64 = 44;
public static native int elementSize(int elementType);
}

View File

@ -132,7 +132,7 @@ public class LiteSession {
private native List<Long> getInputs(long sessionPtr);
private native Long getInputsByTensorName(long sessionPtr, String tensorName);
private native long getInputsByTensorName(long sessionPtr, String tensorName);
private native List<Long> getOutputsByNodeName(long sessionPtr, String nodeName);
@ -140,7 +140,7 @@ public class LiteSession {
private native List<String> getOutputTensorNames(long sessionPtr);
private native Long getOutputByTensorName(long sessionPtr, String tensorName);
private native long getOutputByTensorName(long sessionPtr, String tensorName);
private native void free(long sessionPtr);

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
project (Lite-java)
cmake_minimum_required(VERSION 3.10)
project(Lite-java)
set(BUILD_LITE "on")
set(PLATFORM_ARM "on")
@ -31,7 +31,7 @@ include(${TOP_DIR}/cmake/external_libs/flatbuffers.cmake)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${LITE_DIR}) ## lite include
include_directories(${TOP_DIR}/mindspore/core/) ## core include
include_directories(${LITE_DIR}/build)
include_directories(${LITE_DIR}/build) ## flatbuffers
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${ANDROID_ABI}/)
@ -46,4 +46,4 @@ add_library(mindspore-lite-jni SHARED
find_library(log-lib log)
target_link_libraries(mindspore-lite-jni mindspore-lite ${log-lib} )
target_link_libraries(mindspore-lite-jni mindspore-lite ${log-lib})

View File

@ -18,6 +18,6 @@
#include "common/ms_log.h"
#include "include/version.h"
extern "C" JNIEXPORT jstring JNICALL Java_com_mindspore_lite_Version_version(JNIEnv *env, jobject thiz) {
extern "C" JNIEXPORT jstring JNICALL Java_com_mindspore_lite_Version_version(JNIEnv *env, jclass thiz) {
return env->NewStringUTF(mindspore::lite::Version().c_str());
}