0

I try everything, but I think I have ever think OK, but it still says this error:

No implementation found for native Lcom/jp/algi/Corelib;.vector ([F)[F
threadid=11: thread exiting with uncaught exception (group=0x4001e578)

.cpp file >

 extern "C"{
   JNIEXPORT jfloatArray JNICALL Java_com_jp_algi_Corelib_vector
       (JNIEnv *env, jobject clazz, jfloatArray cinput)
       {
      ////


         } 
               }

.h file generated by javah >

       JNIEXPORT jfloatArray JNICALL Java_com_jp_algi_Corelib_vector
        (JNIEnv *, jobject, jfloatArray)

class where I have the native methods .java>

    package com.jp.algi;

      public class Corelib {

     static {
    System.loadLibrary("com_jp_algi_Corelib");
       }

// TestFileBroswerActivity(vstup_RGB);
     public native float[] vector(float[] input);

I calling this method throght another class.. ISnt problem in the App.mk<

      APP_ABI := armeabi armeabi-v7a
BenMorel
  • 34,448
  • 50
  • 182
  • 322
Luke Smith
  • 1
  • 1
  • 4

1 Answers1

1

Is the library really called libcom_jp_algi_Corelib.so? loadLibrary() expects the library name without the lib prefix and .so extension.

Library name is specified in Android.mk as LOCAL_MODULE. It's also without lib and extension.

Seva Alekseyev
  • 59,826
  • 25
  • 160
  • 281
  • True but the problem isn't with the loadLibrary() call, it is when calling the native method. At the moment of loading the library it doesn't know what Java method signatures are supposed to exist inside it. – user207421 Jan 13 '13 at 23:19
  • How can I find out if the libcom_jp_algi_Corelib.so is really called? Log: 14:20:11 **** Incremental Build of configuration Default for project FileBroswerActivity **** sh "C:\\android-ndk-r5c\\ndk-build" all Install : libcom_jp_algi_Corelib.so => libs/armeabi/libcom_jp_algi_Corelib.so Install : libcom_jp_algi_Corelib.so => libs/armeabi-v7a/libcom_jp_algi_Corelib.so 14:20:15 Build Finished (took 3s.750ms) – Luke Smith Jan 15 '13 at 13:21
  • Check the contents of `(project)\libs\armeabi`. The library should be there, as an `.so` file. – Seva Alekseyev Jan 15 '13 at 13:46
  • yes there are in libs\armeabi one .co file and in the libs\armeabi\libs/armeabi-v7a/ on e .so file , these contetnts its somethink withou t readable format.. – Luke Smith Jan 16 '13 at 14:19
  • Iam tested this on S2 device , armeabi armeabi-v7a , is there problem.? becou I delte App.mk and the error is the same – Luke Smith Jan 16 '13 at 15:03
  • ANd there is problem when i Delte syste.loadlib itds the same error, and the Library is loaded , when is not delete , I tested by Log. – Luke Smith Jan 16 '13 at 15:07