0
W/dalvikvm(3937): No implementation found for native Lcom/video/v2/camera/ExternalCamera;.converttobmp (Landroid/graphics/Bitmap;)V

加载已public class ExternalCamera使用的库

static {
            try {
                System.loadLibrary("ExternalFullHd");
            } catch (UnsatisfiedLinkError e) {
                e.getMessage();
            }
    }   
public native void converttobmp(Bitmap bitmap);

在 ExternalFullHd.c & ExternalFullHd.hi 有

void Java_com_video_v2_camera_ExternalCamera_stopCamera(JNIEnv* env,jobject thiz);
void Java_com_video_v2_camera_ExternalCamera_converttobmp ( JNIEnv* env,jobject thiz,jobject bitmap);

&

void 
Java_com_video_v2_camera_ExternalCamera_converttobmp( JNIEnv* env,jobject thiz,jobject bitmap){
//code

}
4

1 回答 1

1

正如我的评论中所述,不要忘记将 C/C++ 函数声明为extern "C"和 JNIEXPORT。

于 2012-12-14T08:50:57.630 回答