gpt4 book ai didi

Android NDK 未找到实现

转载 作者:行者123 更新时间:2023-11-30 15:53:09 24 4
gpt4 key购买 nike

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

使用公共(public)类ExternalCamera加载库

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

在ExternalFullHd.c和ExternalFullHd.h中我有

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

}

最佳答案

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

关于Android NDK 未找到实现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13864960/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com