Android项目中ffmpegutils的UnsatisfiedLinkError

时间:2017-10-06 03:15:36

标签: android ffmpeg

我已将我的libffmpegutils.so文件放入: libs-> armeabi

现在当我尝试处理视频时,我需要的第一件事是加载ffmpeg,为此我有代码行:

System.loadLibrary("ffmpegutils");

为此,我得到了崩溃:

java.lang.RuntimeException: 
  at android.os.AsyncTask$3.done (AsyncTask.java:309)
  at java.util.concurrent.FutureTask.finishCompletion (FutureTask.java:354)
  at java.util.concurrent.FutureTask.setException (FutureTask.java:223)
  at java.util.concurrent.FutureTask.run (FutureTask.java:242)
  at android.os.AsyncTask$SerialExecutor$1.run (AsyncTask.java:234)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1113)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:588)
  at java.lang.Thread.run (Thread.java:818)
Caused by: java.lang.UnsatisfiedLinkError: 
  at com.video.converter.util.VideoEngine.convertvideo (Native Method)
  at video.format.converter.view.ViewVideo$CompressTask.doInBackground (ViewVideo.java:384)
  at video.format.converter.view.ViewVideo$CompressTask.doInBackground (ViewVideo.java:1)
  at android.os.AsyncTask$2.call (AsyncTask.java:295)
  at java.util.concurrent.FutureTask.run (FutureTask.java:237)

这意味着什么以及如何解决这次崩溃?

1 个答案:

答案 0 :(得分:1)

UnsatisfiedLinkError表示找不到当前架构的库,或者无法正确读取。

将您的本机库保留在# Subquery returns `employee_id` from `logs` with the given `skill_id` sq = session.query(Log.employee_id).\ filter(Log.skill_id == skill_id).\ subquery() # Fetch `Employee` that matches `employee_id` in `sq` q = session.query(Employee).\ filter(Employee.employee_id.in_(sq)) employees = q.all() # or paginate, e.g. q.limit(..).all()

目录中

例如project/app/src/main/jniLibs/

还要确保设备架构匹配。

如果您使用的是eclipse,请按照以下答案:https://stackoverflow.com/a/8650545/5137352