java - No Implementation found for native in ndk -
i struck error, using jni ... have simple native method in android activity class , created header , implemented c file that...unable find mistake pls
here files have
activity
static{ system.loadlibrary("fluidsynth"); } private native string textoverjni(); header file
/* not edit file - machine generated */ #include <jni.h> /* header class com_example_fluidsynthtest_myfluidsyntho */ #ifndef _included_com_example_fluidsynthtest_myfluidsyntho #define _included_com_example_fluidsynthtest_myfluidsyntho #ifdef __cplusplus extern "c" { #endif #undef com_example_fluidsynthtest_myfluidsyntho_mode_private #define com_example_fluidsynthtest_myfluidsyntho_mode_private 0l #undef com_example_fluidsynthtest_myfluidsyntho_mode_world_readable #define com_example_fluidsynthtest_myfluidsyntho_mode_world_readable 1l #undef com_example_fluidsynthtest_myfluidsyntho_mode_world_writeable #define com_example_fluidsynthtest_myfluidsyntho_mode_world_writeable 2l #undef com_example_fluidsynthtest_myfluidsyntho_mode_append #define com_example_fluidsynthtest_myfluidsyntho_mode_append 32768l #undef com_example_fluidsynthtest_myfluidsyntho_bind_auto_create #define com_example_fluidsynthtest_myfluidsyntho_bind_auto_create 1l #undef com_example_fluidsynthtest_myfluidsyntho_bind_debug_unbind #define com_example_fluidsynthtest_myfluidsyntho_bind_debug_unbind 2l #undef com_example_fluidsynthtest_myfluidsyntho_bind_not_foreground #define com_example_fluidsynthtest_myfluidsyntho_bind_not_foreground 4l #undef com_example_fluidsynthtest_myfluidsyntho_context_include_code #define com_example_fluidsynthtest_myfluidsyntho_context_include_code 1l #undef com_example_fluidsynthtest_myfluidsyntho_context_ignore_security #define com_example_fluidsynthtest_myfluidsyntho_context_ignore_security 2l #undef com_example_fluidsynthtest_myfluidsyntho_context_restricted #define com_example_fluidsynthtest_myfluidsyntho_context_restricted 4l #undef com_example_fluidsynthtest_myfluidsyntho_result_canceled #define com_example_fluidsynthtest_myfluidsyntho_result_canceled 0l #undef com_example_fluidsynthtest_myfluidsyntho_result_ok #define com_example_fluidsynthtest_myfluidsyntho_result_ok -1l #undef com_example_fluidsynthtest_myfluidsyntho_result_first_user #define com_example_fluidsynthtest_myfluidsyntho_result_first_user 1l #undef com_example_fluidsynthtest_myfluidsyntho_default_keys_disable #define com_example_fluidsynthtest_myfluidsyntho_default_keys_disable 0l #undef com_example_fluidsynthtest_myfluidsyntho_default_keys_dialer #define com_example_fluidsynthtest_myfluidsyntho_default_keys_dialer 1l #undef com_example_fluidsynthtest_myfluidsyntho_default_keys_shortcut #define com_example_fluidsynthtest_myfluidsyntho_default_keys_shortcut 2l #undef com_example_fluidsynthtest_myfluidsyntho_default_keys_search_local #define com_example_fluidsynthtest_myfluidsyntho_default_keys_search_local 3l #undef com_example_fluidsynthtest_myfluidsyntho_default_keys_search_global #define com_example_fluidsynthtest_myfluidsyntho_default_keys_search_global 4l /* * class: com_example_fluidsynthtest_myfluidsyntho * method: textoverjni * signature: ()ljava/lang/string; */ jniexport jstring jnicall java_com_example_fluidsynthtest_myfluidsyntho_textoverjni (jnienv *, jobject); #ifdef __cplusplus } #endif #endif c file
#include <jni.h> #include <string.h> #include <myfluidsyntho.h> jniexport jstring java_com_example_fluidsynthtest_myfluidsyntho_textoverjni (jnienv* env, jobject obj){ return (*env)->newstringutf(env, "hello worlddd myfluidsynth1 !"); } android.mk
local_path := $(call my-dir) include $(clear_vars) local_module := fluidsynth #local_c_includes +:= $(local_path)/include\ $(local_path)/include/fluidsynth local_src_files +:= \ myfluidsyntho.c #local_ldlibs := -llog include $(build_shared_library) #include $(clear_vars) #include $(build_shared_library)
for "no implementation found" issues while building android ndk, can following links explain reasons , solutions these problems.
android ndk c++ jni (no implementation found native...)
android ndk jni no implementation found error
"no implementation found native" error when calling c function - android ndk - eclipse
Comments
Post a Comment