因为集成腾讯的sdk,发现库冲突了; 本打算只用腾讯的那三个库,发现腾讯的ijkplayer做了一件比较那啥的事情,他们把这几个方法改了名称,导致不能直接换库;
private static native void native_init();
private native void native_setup(Object IjkMediaPlayer_this);
private native void native_finalize();
private native void native_message_loop(Object IjkMediaPlayer_this);
UncaughtException detected: java.lang.UnsatisfiedLinkError: No implementation found for void tv.danmaku.ijk.media.player.IjkMediaPlayer.native_init() (tried Java_tv_danmaku_ijk_media_player_IjkMediaPlayer_native_1init and Java_tv_danmaku_ijk_media_player_IjkMediaPlayer_native_1init__)
1: libijkffmpeg.so
find ./ -name "*.sh" -exec grep -HEn --color "ijkffmpeg" {} \;
./android/contrib/tools/do-compile-ffmpeg.sh
修改ijkffmpeg 为 ijkffmpeg2
编译ffmpeg,会生成新的 libijkffmpeg2.so
find ./ -name "*.mk" -exec grep -HEn --color "ijkffmpeg" {} \;
vi ./android/ijkplayer/ijkplayer-armv7a/src/main/jni/ffmpeg/Android.mk
两处:
LOCAL_MODULE := ijkffmpeg2
LOCAL_SRC_FILES := $(MY_APP_FFMPEG_OUTPUT_PATH)/libijkffmpeg2.so
2:libijkplayer.so
find ./ -name "*.mk" -exec grep -HEn --color "ijkplayer" {} \;
修改./ijkmedia/ijkplayer/Android.mk
LOCAL_SHARED_LIBRARIES := ijkffmpeg2 ijksdl2
LOCAL_MODULE := ijkplayer2
3:libijksdl.so
find ./ -name "*.mk" -exec grep -HEn --color "ijksdl" {} \;
./ijkmedia/ijkplayer/Android.mk:62:LOCAL_SHARED_LIBRARIES := ijkffmpeg2 ijksdl2
./ijkmedia/ijksdl/Android.mk:76:LOCAL_MODULE := ijksdl2
网友评论