mabeijianxi / small-video-record

利用FFmpeg视频录制微信小视频与其压缩处理
Apache License 2.0
3.46k stars 729 forks source link

根据步骤,出现,何解?/vendor/lib, /system/lib]]] couldn't find "libavutil.so" #322

Open JsonWong87 opened 6 years ago

JsonWong87 commented 6 years ago

java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader [DexPathList[[zip file "/data/app/com.shenzhen.highzou-1/base.apk", zip file "/data/app/com.shenzhen.highzou-1/split_lib_dependencies_apk.apk", zip file "/data/app/com.shenzhen.highzou-1/split_lib_slice_0_apk.apk", zip file "/data/app/com.shenzhen.highzou-1/split_lib_slice_1_apk.apk", zip file "/data/app/com.shenzhen.highzou-1/split_lib_slice_2_apk.apk", zip file "/data/app/com.shenzhen.highzou-1/split_lib_slice_3_apk.apk", zip file "/data/app/com.shenzhen.highzou-1/split_lib_slice_4_apk.apk", zip file "/data/app/com.shenzhen.highzou-1/split_lib_slice_5_apk.apk", zip file "/data/app/com.shenzhen.highzou-1/split_lib_slice_6_apk.apk", zip file "/data/app/com.shenzhen.highzou-1/split_lib_slice_7_apk.apk", zip file "/data/app/com.shenzhen.highzou-1/split_lib_slice_8_apk.apk", zip file "/data/app/com.shenzhen.highzou-1/split_lib_slice_9_apk.apk"], nativeLibraryDirectories=[/data/app/com.shenzhen.highzou-1/lib/arm, /data/app/com.shenzhen.highzou-1/base.apk!/lib/armeabi, /data/app/com.shenzhen.highzou-1/split_lib_dependencies_apk.apk!/lib/armeabi, /data/app/com.shenzhen.highzou-1/split_lib_slice_0_apk.apk!/lib/armeabi, /data/app/com.shenzhen.highzou-1/split_lib_slice_1_apk.apk!/lib/armeabi, /data/app/com.shenzhen.highzou-1/split_lib_slice_2_apk.apk!/lib/armeabi, /data/app/com.shenzhen.highzou-1/split_lib_slice_3_apk.apk!/lib/armeabi, /data/app/com.shenzhen.highzou-1/split_lib_slice_4_apk.apk!/lib/armeabi, /data/app/com.shenzhen.highzou-1/split_lib_slice_5_apk.apk!/lib/armeabi, /data/app/com.shenzhen.highzou-1/split_lib_slice_6_apk.apk!/lib/armeabi, /data/app/com.shenzhen.highzou-1/split_lib_slice_7_apk.apk!/lib/armeabi, /data/app/com.shenzhen.highzou-1/split_lib_slice_8_apk.apk!/lib/armeabi, /data/app/com.shenzhen.highzou-1/split_lib_slice_9_apk.apk!/lib/armeabi, /vendor/lib, /system/lib]]] couldn't find "libavutil.so" at java.lang.Runtime.loadLibrary(Runtime.java:367) at java.lang.System.loadLibrary(System.java:1076) at com.mabeijianxi.smallvideorecord2.jniinterface.FFmpegBridge.(FFmpegBridge.java:14) at com.mabeijianxi.smallvideorecord2.jniinterface.FFmpegBridge.initJXFFmpeg(Native Method) at com.mabeijianxi.smallvideorecord2.JianXiCamera.initialize(JianXiCamera.java:40) at com.higo.common.MyApplication.initSmallVideo(MyApplication.java:490) at com.higo.common.MyApplication.onCreate(MyApplication.java:278) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1013) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4707) at android.app.ActivityThread.-wrap1(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

iFCoder commented 6 years ago

如果你是用的是 compile 'com.mabeijianxi:small-video-record2:2.0.0@aar' 这种远程方式依赖,那么2.0.0 正式版以后采用手动复制 SO 的做法,避免与大家项目不兼容,具体做法是进入本项目 "all_lib" 文件夹,选择你喜欢的架构然后 copy 到你主 module 的 jniLibs 下。 这个步骤你是不是没有做对啊,我刚开始的时候也是这个问题,需要选择导入“all_lib”文件夹中的so文件。