android NDK找不到符号“mmap64”

时间:2018-06-04 03:32:47

标签: ffmpeg android-ndk video-processing ndk-build android-ffmpeg

我是ffmpep的初学者,我做了第一个简单的项目作为本教程

  

https://proandroiddev.com/android-ndk-how-to-integrate-pre-built-libraries-in-case-of-the-ffmpeg-7ff24551a0f?gi=72f471c40747

但它引发了错误“找不到mmap64符号......”。

请帮帮我!

这是我的logcat:

  

java.lang.UnsatisfiedLinkError:dlopen失败:无法加载“libnative-lib.so”所需的库“libavutil.so”;导致无法找到“libavutil.so”引用的符号“mmap64”...                                                          在java.lang.Runtime.loadLibrary(Runtime.java:365)                                                          在java.lang.System.loadLibrary(System.java:526)                                                          在video.media.tainguyen.test_ffmpeg_ndk.MainActivity。(MainActivity.java:12)                                                          at java.lang.Class.newInstanceImpl(Native Method)                                                          在java.lang.Class.newInstance(Class.java:1208)                                                          在android.app.Instrumentation.newActivity(Instrumentation.java:1079)                                                          在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2222)                                                          在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2363)                                                          在android.app.ActivityThread.access $ 900(ActivityThread.java:161)                                                          在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1265)                                                          在android.os.Handler.dispatchMessage(Handler.java:102)                                                          在android.os.Looper.loop(Looper.java:157)                                                          在android.app.ActivityThread.main(ActivityThread.java:5356)                                                          at java.lang.reflect.Method.invokeNative(Native Method)                                                          在java.lang.reflect.Method.invoke(Method.java:515)                                                          在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:1265)                                                          在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)                                                          在dalvik.system.NativeStart.main(本地方法)

我使用NDK r17,ffmpeg版本3.4,ubuntu 12.04.5(64位)构建了我的so文件(我刚刚在ubuntu中构建它,我当前的操作系统是Windows 7 64位) 我的项目是在android studio 2.2中使用NDK r17创建的

  

compileSdkVersion 27

     

buildToolsVersion“27.0.2”

     

minSdkVersion 15

     

targetSdkVersion 27

     

externalNativeBuild {               cmake {                   cppFlags“”                   参数“-DANDROID_STL = c ++ _ shared”                   目标“native-lib”,“avutil”,“avformat”,“avcodec”               }           }           ndk {               abiFilters“x86”,“x86_64”,“armeabi-v7a”,“arm64-v8a”,“armeabi”           }

0 个答案:

没有答案