1

I have placed my libffmpegutils.so file inside: libs->armeabi

Now when I try to process videos and the first thing I need to is load the ffmpeg and for that I have the code line:

System.loadLibrary("ffmpegutils");

And for that I get the crash:

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)

What does that mean and how to fix that crash?

1 Answers1

1

UnsatisfiedLinkError means the library for current architecture is not found or cannot be read properly.

Keep your native libraries in the directory project/app/src/main/jniLibs/

eg project/app/src/main/jniLibs/armeabi/libffmpegutils.so

Also make sure the device architecture matches.

If you are using eclipse, follow this answer: https://stackoverflow.com/a/8650545/5137352

Nabin Bhandari
  • 15,949
  • 6
  • 45
  • 59
  • ok I will try that. For eclipse IDE, that folder will be under root of project on same level as the libs/res/raw folders right? – Piyush-Ask Any Difference Oct 06 '17 at 03:33
  • Using eclipse is not recommended. Check the link in the answer for guide on eclipse. – Nabin Bhandari Oct 06 '17 at 03:37
  • ok so in this link https://code.tutsplus.com/tutorials/advanced-android-getting-started-with-the-ndk--mobile-2152 In the Step 2: Creating the Project, I read that: At the top level of this project, create a directory called “jni” – this is where you’ll put your native code. This should solve me issue of UnsatisfiedLinkError – Piyush-Ask Any Difference Oct 06 '17 at 03:44