bilibili / ijkplayer

Android/iOS video player based on FFmpeg n3.4, with MediaCodec, VideoToolbox support.
GNU General Public License v2.0
32.54k stars 8.13k forks source link

java.lang.UnsatisfiedLinkError: - couldn't find "libijkffmpeg.so" #1489

Open JayGajjar opened 8 years ago

JayGajjar commented 8 years ago

When i try to run app on my device i am getting below error.

I am using moto-g 1st gen for testing. (http://www.gsmarena.com/motorola_moto_g-5831.php) OS is Android 5.1 API 22

I had successfully build ffmpeg and followed below commands in given sequence.

A little help on this issue will be appreciated


./init-android.sh

cd android/contrib
./compile-ffmpeg.sh clean
./compile-ffmpeg.sh all

cd ..
./compile-ijk.sh all
06-17 08:48:40.163 4626-4626/tv.danmaku.ijk.media.example E/AndroidRuntime: FATAL EXCEPTION: main
                                                                            Process: tv.danmaku.ijk.media.example, PID: 4626
                                                                            java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/tv.danmaku.ijk.media.example-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]] couldn't find "libijkffmpeg.so"
                                                                                at java.lang.Runtime.loadLibrary(Runtime.java:366)
                                                                                at java.lang.System.loadLibrary(System.java:988)
                                                                                at tv.danmaku.ijk.media.player.IjkMediaPlayer$1.loadLibrary(IjkMediaPlayer.java:157)
                                                                                at tv.danmaku.ijk.media.player.IjkMediaPlayer.loadLibrariesOnce(IjkMediaPlayer.java:168)
                                                                                at tv.danmaku.ijk.media.example.activities.VideoActivity.onCreate(VideoActivity.java:136)
                                                                                at android.app.Activity.performCreate(Activity.java:6010)
                                                                                at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1129)
                                                                                at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2292)
                                                                                at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2413)
                                                                                at android.app.ActivityThread.access$800(ActivityThread.java:155)
                                                                                at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1317)
                                                                                at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                                at android.os.Looper.loop(Looper.java:135)
                                                                                at android.app.ActivityThread.main(ActivityThread.java:5343)
                                                                                at java.lang.reflect.Method.invoke(Native Method)
                                                                                at java.lang.reflect.Method.invoke(Method.java:372)
                                                                                at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
                                                                                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
bbcallen commented 8 years ago

Any build log? I don't think it was a successful build.

JayGajjar commented 8 years ago

Here is log

http://pastebin.com/ukZPF6zS

bbcallen commented 8 years ago

Nothing wrong in native build. Then there must be something wrong in apk build.

JayGajjar commented 8 years ago

I haven't edited single line of code. Just trying to run demo project

On Friday 17 June 2016, bbcallen notifications@github.com wrote:

Nothing wrong in native build. Then there must be something wrong in apk build.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Bilibili/ijkplayer/issues/1489#issuecomment-226673659, or mute the thread https://github.com/notifications/unsubscribe/AJG6MIU9Po7aVRT0F_h7Uqx4Jpi4pdGTks5qMhgfgaJpZM4I3_9k .

Regards, Ph : +919904252434 Skype : jaygajjar77 Jay S Gajjar | Mobile Developer

bbcallen commented 8 years ago

Confused, too. Try uninstall, clean in Android Studio, rebuild, blablabla

JayGajjar commented 8 years ago

It worked. I took clone again and did all the process from the scratch.

15189611 commented 8 years ago

hi,bbcallen 我能加下你?谢谢

JayGajjar commented 8 years ago

Hi, sorry to bother you again

I had successfully run the app on my end. But when i am trying to play rtsp stream it giving me below error. Can you please help me out.

Also i need some help in setting the player options. Can you provide me some guidance?

06-17 23:18:54.190 30542-30542/tv.danmaku.ijk.media.example W/linker: libijkffmpeg.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
06-17 23:18:54.219 30542-30542/tv.danmaku.ijk.media.example D/J4A: J4ALoader: OK: 'android.os.Build$VERSION' loaded
06-17 23:18:54.219 30542-30542/tv.danmaku.ijk.media.example D/J4A: J4ALoader: OK: 'android.os.Build' loaded
06-17 23:18:54.219 30542-30542/tv.danmaku.ijk.media.example D/J4A: J4ALoader: OK: 'java.nio.Buffer' loaded
06-17 23:18:54.219 30542-30542/tv.danmaku.ijk.media.example D/J4A: J4ALoader: OK: 'java.nio.ByteBuffer' loaded
06-17 23:18:54.222 30542-30542/tv.danmaku.ijk.media.example D/J4A: J4ALoader: OK: 'java.util.ArrayList' loaded
06-17 23:18:54.222 30542-30542/tv.danmaku.ijk.media.example I/J4A: API-Level: 22
06-17 23:18:54.222 30542-30542/tv.danmaku.ijk.media.example D/J4A: J4ALoader: OK: 'android.media.AudioTrack' loaded
06-17 23:18:54.222 30542-30542/tv.danmaku.ijk.media.example D/J4A: J4ALoader: OK: 'android.media.MediaCodec$BufferInfo' loaded
06-17 23:18:54.222 30542-30542/tv.danmaku.ijk.media.example D/J4A: J4ALoader: OK: 'android.media.MediaCodec' loaded
06-17 23:18:54.222 30542-30542/tv.danmaku.ijk.media.example D/J4A: J4ALoader: OK: 'android.media.MediaFormat' loaded
06-17 23:18:54.222 30542-30542/tv.danmaku.ijk.media.example W/J4A: J4ALoader: Ignore: 'android.media.PlaybackParams' need API 22
06-17 23:18:54.222 30542-30542/tv.danmaku.ijk.media.example D/J4A: J4ALoader: OK: 'android.os.Bundle' loaded
06-17 23:18:54.223 30542-30542/tv.danmaku.ijk.media.example D/J4A: J4ALoader: OK: 'tv.danmaku.ijk.media.player.misc.IMediaDataSource' loaded
06-17 23:18:54.223 30542-30542/tv.danmaku.ijk.media.example D/J4A: J4ALoader: OK: 'tv.danmaku.ijk.media.player.IjkMediaPlayer' loaded
06-17 23:18:54.225 30542-30542/tv.danmaku.ijk.media.example D/IJKMEDIA: IjkMediaPlayer_native_profileBegin
06-17 23:18:54.225 30542-30542/tv.danmaku.ijk.media.example D/aprof-fake: fake-monstartup libijkplayer.so
06-17 23:18:54.225 30542-30542/tv.danmaku.ijk.media.example D/IJKMEDIA: monstartup: libijkplayer.so
06-17 23:18:54.261 30542-30575/tv.danmaku.ijk.media.example W/EGL_emulation: eglSurfaceAttrib not implemented
06-17 23:18:54.261 30542-30575/tv.danmaku.ijk.media.example W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xb3feb9e0, error=EGL_SUCCESS
06-17 23:18:54.267 30542-30554/tv.danmaku.ijk.media.example I/art: Background sticky concurrent mark sweep GC freed 3044(274KB) AllocSpace objects, 0(0B) LOS objects, 12% free, 1663KB/1906KB, paused 10.872ms total 130.918ms
06-17 23:18:54.321 30542-30542/tv.danmaku.ijk.media.example D/IJKMEDIA: IjkMediaPlayer_native_init
06-17 23:18:54.323 30542-30542/tv.danmaku.ijk.media.example D/IJKMEDIA: IjkMediaPlayer_native_setup
06-17 23:18:54.323 30542-30542/tv.danmaku.ijk.media.example I/IJKMEDIA: av_version_info: ff3.0--ijk0.5.0--dev0.4.5--rc11
06-17 23:18:54.323 30542-30542/tv.danmaku.ijk.media.example D/IJKMEDIA: ffpipeline_create_from_android()
06-17 23:18:54.323 30542-30542/tv.danmaku.ijk.media.example D/IJKMEDIA: ijkmp_set_inject_opaque(0x100446)
06-17 23:18:54.323 30542-30542/tv.danmaku.ijk.media.example D/IJKMEDIA: ijkmp_set_inject_opaque()=void
06-17 23:18:54.324 30542-30542/tv.danmaku.ijk.media.example D/IJKMEDIA: ijkmp_android_set_mediacodec_select_callback()
06-17 23:18:54.325 30542-30542/tv.danmaku.ijk.media.example D/IJKMEDIA: ffpipeline_set_mediacodec_select_callback
06-17 23:18:54.325 30542-30542/tv.danmaku.ijk.media.example D/IJKMEDIA: ijkmp_android_set_mediacodec_select_callback()=void
06-17 23:18:54.325 30542-30542/tv.danmaku.ijk.media.example D/IJKMEDIA: IjkMediaPlayer_native_setLogLevel(3)
06-17 23:18:54.325 30542-30542/tv.danmaku.ijk.media.example D/IJKMEDIA: moncleanup
06-17 23:18:54.325 30542-30542/tv.danmaku.ijk.media.example D/IJKMEDIA: IjkMediaPlayer_setOptionLong
06-17 23:18:54.325 30542-30542/tv.danmaku.ijk.media.example D/IJKMEDIA: IjkMediaPlayer_setOptionLong
06-17 23:18:54.325 30542-30542/tv.danmaku.ijk.media.example D/IJKMEDIA: IjkMediaPlayer_setOptionLong
06-17 23:18:54.325 30542-30542/tv.danmaku.ijk.media.example D/IJKMEDIA: IjkMediaPlayer_setOptionLong
06-17 23:18:54.325 30542-30542/tv.danmaku.ijk.media.example D/IJKMEDIA: IjkMediaPlayer_setOptionLong
06-17 23:18:54.325 30542-30542/tv.danmaku.ijk.media.example D/IJKMEDIA: IjkMediaPlayer_setOptionLong
06-17 23:18:54.325 30542-30542/tv.danmaku.ijk.media.example D/IJKMEDIA: IjkMediaPlayer_setOptionLong
06-17 23:18:54.325 30542-30542/tv.danmaku.ijk.media.example D/IJKMEDIA: IjkMediaPlayer_setOptionLong
06-17 23:18:54.326 30542-30542/tv.danmaku.ijk.media.example D/tv.danmaku.ijk.media.player.IjkMediaPlayer: Couldn't open file on client side, trying server side
06-17 23:18:54.326 30542-30542/tv.danmaku.ijk.media.example D/IJKMEDIA: IjkMediaPlayer_setDataSourceAndHeaders
06-17 23:18:54.326 30542-30542/tv.danmaku.ijk.media.example V/IJKMEDIA: setDataSource: path rtsp://888888:888888@192.168.2.4:554/cam/realmonitor?channel=1&subtype=0
06-17 23:18:54.326 30542-30542/tv.danmaku.ijk.media.example D/IJKMEDIA: ijkmp_set_data_source(url="rtsp://888888:888888@192.168.2.4:554/cam/realmonitor?channel=1&subtype=0")
06-17 23:18:54.326 30542-30542/tv.danmaku.ijk.media.example D/IJKMEDIA: ijkmp_set_data_source(url="rtsp://888888:888888@192.168.2.4:554/cam/realmonitor?channel=1&subtype=0")=0
06-17 23:18:54.326 30542-30542/tv.danmaku.ijk.media.example D/IJKMEDIA: IjkMediaPlayer_setVideoSurface
06-17 23:18:54.326 30542-30542/tv.danmaku.ijk.media.example D/IJKMEDIA: ijkmp_set_android_surface(surface=0xbff2a4f0)
06-17 23:18:54.326 30542-30542/tv.danmaku.ijk.media.example D/IJKMEDIA: ffpipeline_set_surface()
06-17 23:18:54.326 30542-30542/tv.danmaku.ijk.media.example D/IJKMEDIA: ijkmp_set_android_surface(surface=0xbff2a4f0)=void
06-17 23:18:54.327 30542-30542/tv.danmaku.ijk.media.example D/IJKMEDIA: IjkMediaPlayer_prepareAsync
06-17 23:18:54.327 30542-30542/tv.danmaku.ijk.media.example D/IJKMEDIA: ijkmp_prepare_async()
06-17 23:18:54.327 30542-30542/tv.danmaku.ijk.media.example W/IJKMEDIA: remove 'timeout' option for rtmp.
06-17 23:18:54.327 30542-30542/tv.danmaku.ijk.media.example I/IJKMEDIA: ===== versions =====
06-17 23:18:54.327 30542-30542/tv.danmaku.ijk.media.example I/IJKMEDIA: FFmpeg       : ff3.0--ijk0.5.0--dev0.4.5--rc11
06-17 23:18:54.327 30542-30542/tv.danmaku.ijk.media.example I/IJKMEDIA: libavutil    : 55.17.103
06-17 23:18:54.327 30542-30542/tv.danmaku.ijk.media.example I/IJKMEDIA: libavcodec   : 57.24.102
06-17 23:18:54.327 30542-30542/tv.danmaku.ijk.media.example I/IJKMEDIA: libavformat  : 57.25.100
06-17 23:18:54.327 30542-30542/tv.danmaku.ijk.media.example I/IJKMEDIA: libswscale   : 4.0.100
06-17 23:18:54.327 30542-30542/tv.danmaku.ijk.media.example I/IJKMEDIA: libswresample: 2.0.101
06-17 23:18:54.327 30542-30542/tv.danmaku.ijk.media.example I/IJKMEDIA: ===== options =====
06-17 23:18:54.327 30542-30542/tv.danmaku.ijk.media.example I/IJKMEDIA: player-opts : mediacodec                   = 1
06-17 23:18:54.327 30542-30542/tv.danmaku.ijk.media.example I/IJKMEDIA: player-opts : mediacodec-auto-rotate       = 1
06-17 23:18:54.327 30542-30542/tv.danmaku.ijk.media.example I/IJKMEDIA: player-opts : opensles                     = 0
06-17 23:18:54.328 30542-30542/tv.danmaku.ijk.media.example I/IJKMEDIA: player-opts : overlay-format               = 842225234
06-17 23:18:54.328 30542-30542/tv.danmaku.ijk.media.example I/IJKMEDIA: player-opts : framedrop                    = 1
06-17 23:18:54.328 30542-30542/tv.danmaku.ijk.media.example I/IJKMEDIA: player-opts : start-on-prepared            = 0
06-17 23:18:54.328 30542-30542/tv.danmaku.ijk.media.example I/IJKMEDIA: format-opts : ijkinject-opaque             = 1049670
06-17 23:18:54.328 30542-30542/tv.danmaku.ijk.media.example I/IJKMEDIA: format-opts : ijkapplication               = -1526356512
06-17 23:18:54.328 30542-30542/tv.danmaku.ijk.media.example I/IJKMEDIA: format-opts : http-detect-range-support    = 0
06-17 23:18:54.328 30542-30542/tv.danmaku.ijk.media.example I/IJKMEDIA: codec-opts  : skip_loop_filter             = 48
06-17 23:18:54.328 30542-30542/tv.danmaku.ijk.media.example I/IJKMEDIA: ===================
06-17 23:18:54.329 30542-30542/tv.danmaku.ijk.media.example D/IJKMEDIA: ijkmp_prepare_async()=0
06-17 23:18:54.339 30542-30812/tv.danmaku.ijk.media.example I/IJKMEDIA: SDL_RunThread: [30812] ff_msg_loop
06-17 23:18:54.339 30542-30812/tv.danmaku.ijk.media.example D/IJKMEDIA: message_loop
06-17 23:18:54.341 30542-30814/tv.danmaku.ijk.media.example I/IJKMEDIA: SDL_RunThread: [30814] ff_read
06-17 23:18:54.341 30542-30814/tv.danmaku.ijk.media.example W/IJKMEDIA: **remove 'timeout' option for rtmp.**
06-17 23:18:54.341 30542-30814/tv.danmaku.ijk.media.example D/IJKMEDIA: No default whitelist set
06-17 23:18:54.343 30542-30812/tv.danmaku.ijk.media.example D/IJKMEDIA: FFP_MSG_FLUSH:
06-17 23:18:54.368 30542-30813/tv.danmaku.ijk.media.example I/IJKMEDIA: SDL_RunThread: [30813] ff_vout
06-17 23:18:54.505 30542-30554/tv.danmaku.ijk.media.example W/art: Suspending all threads took: 15.418ms
06-17 23:18:54.544 30542-30554/tv.danmaku.ijk.media.example I/art: Background sticky concurrent mark sweep GC freed 487(22KB) AllocSpace objects, 0(0B) LOS objects, 4% free, 1816KB/1906KB, paused 20.641ms total 129.661ms
06-17 23:18:54.675 30542-30814/tv.danmaku.ijk.media.example I/IJKMEDIA: SDP:
06-17 23:18:54.675 30542-30814/tv.danmaku.ijk.media.example D/IJKMEDIA: video codec set to: h264
06-17 23:18:54.675 30542-30814/tv.danmaku.ijk.media.example D/IJKMEDIA: RTP Profile IDC: 67 Profile IOP: 42 Level: e0
06-17 23:18:54.675 30542-30814/tv.danmaku.ijk.media.example D/IJKMEDIA: Extradata set to 0xb3f57340 (size: 49)
06-17 23:18:54.675 30542-30814/tv.danmaku.ijk.media.example D/IJKMEDIA: RTP Packetization Mode: 1
06-17 23:18:54.675 30542-30814/tv.danmaku.ijk.media.example D/IJKMEDIA: audio codec set to: (null)
06-17 23:18:54.675 30542-30814/tv.danmaku.ijk.media.example D/IJKMEDIA: audio samplerate set to: 8000
06-17 23:18:54.675 30542-30814/tv.danmaku.ijk.media.example D/IJKMEDIA: audio channels set to: 1
06-17 23:18:54.675 30542-30814/tv.danmaku.ijk.media.example D/IJKMEDIA: No default whitelist set
06-17 23:18:54.676 30542-30814/tv.danmaku.ijk.media.example D/IJKMEDIA: No default whitelist set
06-17 23:18:54.676 30542-30814/tv.danmaku.ijk.media.example W/IJKMEDIA: 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
06-17 23:18:54.676 30542-30814/tv.danmaku.ijk.media.example D/IJKMEDIA: end receive buffer size reported is 131072
06-17 23:18:54.676 30542-30814/tv.danmaku.ijk.media.example D/IJKMEDIA: No default whitelist set
06-17 23:18:54.676 30542-30814/tv.danmaku.ijk.media.example W/IJKMEDIA: 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
06-17 23:18:54.676 30542-30814/tv.danmaku.ijk.media.example D/IJKMEDIA: end receive buffer size reported is 131072
06-17 23:18:54.764 30542-30542/tv.danmaku.ijk.media.example I/Choreographer: Skipped 31 frames!  The application may be doing too much work on its main thread.
06-17 23:18:54.810 30542-30814/tv.danmaku.ijk.media.example I/IJKMEDIA: setting jitter buffer size to 500
06-17 23:18:54.810 30542-30814/tv.danmaku.ijk.media.example D/IJKMEDIA: No default whitelist set
06-17 23:18:54.810 30542-30814/tv.danmaku.ijk.media.example D/IJKMEDIA: No default whitelist set
06-17 23:18:54.810 30542-30814/tv.danmaku.ijk.media.example W/IJKMEDIA: 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
06-17 23:18:54.812 30542-30814/tv.danmaku.ijk.media.example D/IJKMEDIA: end receive buffer size reported is 131072
06-17 23:18:54.813 30542-30814/tv.danmaku.ijk.media.example D/IJKMEDIA: No default whitelist set
06-17 23:18:54.813 30542-30814/tv.danmaku.ijk.media.example W/IJKMEDIA: 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
06-17 23:18:54.813 30542-30814/tv.danmaku.ijk.media.example D/IJKMEDIA: end receive buffer size reported is 131072
06-17 23:18:54.963 30542-30814/tv.danmaku.ijk.media.example I/IJKMEDIA: setting jitter buffer size to 500
06-17 23:18:54.963 30542-30814/tv.danmaku.ijk.media.example D/IJKMEDIA: hello state=0
06-17 23:18:55.187 30542-30814/tv.danmaku.ijk.media.example E/IJKMEDIA: **Option ijkinject-opaque not found.**
06-17 23:19:06.192 30542-30814/tv.danmaku.ijk.media.example W/IJKMEDIA: UDP timeout, retrying with TCP
06-17 23:19:06.344 30542-30814/tv.danmaku.ijk.media.example I/IJKMEDIA: setting jitter buffer size to 0
06-17 23:19:06.384 30542-30814/tv.danmaku.ijk.media.example E/IJKMEDIA: method SETUP failed: 404 Not Found
06-17 23:19:06.384 30542-30814/tv.danmaku.ijk.media.example D/IJKMEDIA: Content-Length: 0
                                                                        CSeq: 9
06-17 23:19:06.384 30542-30814/tv.danmaku.ijk.media.example W/IJKMEDIA: Could not find codec parameters for stream 0 (Video: h264, 1 reference frame, none(left)): unspecified size
                                                                        Consider increasing the value for the 'analyzeduration' and 'probesize' options
06-17 23:19:06.385 30542-30814/tv.danmaku.ijk.media.example W/IJKMEDIA: Could not find codec parameters for stream 1 (Audio: pcm_alaw, 8000 Hz, 1 channels, 64 kb/s): unspecified sample format
                                                                        Consider increasing the value for the 'analyzeduration' and 'probesize' options
06-17 23:19:06.385 30542-30814/tv.danmaku.ijk.media.example W/IJKMEDIA: rtsp://888888:888888@192.168.2.4:554/cam/realmonitor?channel=1&subtype=0: could not find codec parameters
06-17 23:19:06.386 30542-30812/tv.danmaku.ijk.media.example D/IJKMEDIA: FFP_MSG_ERROR: 0
06-17 23:19:06.388 30542-30542/tv.danmaku.ijk.media.example E**/tv.danmaku.ijk.media.player.IjkMediaPlayer: Error (-10000,0)**
06-17 23:19:06.388 30542-30542/tv.danmaku.ijk.media.example D/IjkVideoView: Error: -10000,0
06-17 23:19:06.393 30542-30814/tv.danmaku.ijk.media.example I/IJKMEDIA: SDL_JNI_DetachThreadEnv: [30814]
06-17 23:19:06.396 30542-30542/tv.danmaku.ijk.media.example I/AppCompatDelegate: The Activity's LayoutInflater already has a Factory installed so we can not install AppCompat's
06-17 23:19:06.469 30542-30575/tv.danmaku.ijk.media.example W/EGL_emulation: eglSurfaceAttrib not implemented
06-17 23:19:06.469 30542-30575/tv.danmaku.ijk.media.example W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xa505a9e0, error=EGL_SUCCESS
bbcallen commented 8 years ago

Sorry, not familiar with RTSP protocol.

andyiac commented 8 years ago

hi @JayGajjar i just meet the same error I check my ANDROID_NDK version and found my NDK version is "r10d", then, i change the NDK version which bbcallen refered "r10e", then build success.

JayGajjar commented 8 years ago

Please follow below given steps. Once you had successfully compiled. Then you will able to run the demo project.

# install homebrew, git, yasm
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install git
brew install yasm

# add these lines to your ~/.bash_profile or ~/.profile
# export ANDROID_SDK=<your sdk path>
# export ANDROID_NDK=<your ndk path>

# on Cygwin (unmaintained)
# install git, make, yasm

git clone https://github.com/Bilibili/ijkplayer.git ijkplayer-android
cd ijkplayer-android
git checkout -B latest k0.5.1

./init-android.sh

cd android/contrib
./compile-ffmpeg.sh clean
./compile-ffmpeg.sh all

cd ..
./compile-ijk.sh all
# Android Studio:
#     Open an existing Android Studio project
#     Select android/ijkplayer/ and import
SufianBabri commented 7 years ago

@JayGajjar you're right. It must have been because there were no .so files generated. So I just removed all32Compile project and all64Compile project and instead did gradle import, like:

compile 'tv.danmaku.ijk.media:ijkplayer-armv5:0.7.6'
compile 'tv.danmaku.ijk.media:ijkplayer-arm64:0.7.6'
compile 'tv.danmaku.ijk.media:ijkplayer-x86:0.7.6'
compile 'tv.danmaku.ijk.media:ijkplayer-x86_64:0.7.6'

It now is working fine. Just thought it might help someone else. :)

Qloop commented 7 years ago

@SufianBabri Thank you for your words. It solved my problem. :)

happyharley commented 5 years ago

I have met the same error too,due to a unsuccessful builder ,without "libijkffmpeg.so", if change the dependance from local project to 'tv.danmaku.ijk.media:ijkplayer",everything going be ok; but why the build is not successful, i have no idea

Process: tv.danmaku.ijk.media.example, PID: 26347 java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/tv.danmaku.ijk.media.example-PJGNxBXLj4wYtTwrczPSzg==/base.apk"],nativeLibraryDirectories=[/data/app/tv.danmaku.ijk.media.example-PJGNxBXLj4wYtTwrczPSzg==/lib/arm64, /system/lib64, /product/lib64]]] couldn't find "libijkffmpeg.so" at java.lang.Runtime.loadLibrary0(Runtime.java:1012) at java.lang.System.loadLibrary(System.java:1672) at tv.danmaku.ijk.media.player.IjkMediaPlayer$1.loadLibrary(IjkMediaPlayer.java:179) at tv.danmaku.ijk.media.player.IjkMediaPlayer.loadLibrariesOnce(IjkMediaPlayer.java:190) at tv.danmaku.ijk.media.example.activities.VideoActivity.onCreate(VideoActivity.java:137) at android.app.Activity.performCreate(Activity.java:7436) at android.app.Activity.performCreate(Activity.java:7426) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1286) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3279) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3484) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:86) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2123) at android.os.Handler.dispatchMessage(Handler.java:109) at android.os.Looper.loop(Looper.java:207) at android.app.ActivityThread.main(ActivityThread.java:7470) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:958)