我正在使用FFmpeg [https://github.com/WritingMinds/ffmpeg-android-java]
开发一个Android应用程序成功运行4.1到6.0安卓版本的所有应用程序功能,但我面临Android版本的跟随错误 - 7.0(牛轧糖),7.1.1(牛轧糖)和8.0(奥利奥)
当我从我的Android应用程序中为Nougat和Oreo选择.mp2文件时,会出现以下错误。我使用FFmpeg进行转换。 例如。 - .wav到.mp2,反之亦然
Android Studio - 3.0, compileSdkVersion - 23, targetSdkVersion - 23,
I/FFmpeg: Loading FFmpeg for armv7-neon CPU
I/FFMPEG convert start: -i //storage//emulated//0//sample-160kbps.mp2 //storage//emulated//0//sample-160kbps_copy2play.wav
D/FFmpeg: Running publishing updates method
I/FFMPEG convert progress: CANNOT LINK EXECUTABLE "/data/user/0/com.yellowtec.uplinkixm.app/files/ffmpeg": /data/data/com.yellowtec.uplinkixm.app/files/ffmpeg: has text relocations-i //storage//emulated//0//sample-160kbps.mp2 //storage//emulated//0//sample-160kbps_copy2play.wav
E/FFMPEG convert error: command:: CANNOT LINK EXECUTABLE "/data/user/0/com.yellowtec.uplinkixm.app/files/ffmpeg": /data/data/com.yellowtec.uplinkixm.app/files/ffmpeg: has text relocations
-i //storage//emulated//0//sample-160kbps.mp2 //storage//emulated//0//sample-160kbps_copy2play.wav
E/ExtMediaPlayer-JNI: env->IsInstanceOf fails
E/MediaPlayer-JNI: JNIMediaPlayerFactory: bIsQCMediaPlayerPresent 0
E/ExtMediaPlayer-JNI: env->IsInstanceOf fails
E/MediaPlayer-JNI: JNIMediaPlayerFactory: bIsQCMediaPlayerPresent 0
E/MYMediaPlayer: I got an ERROR
java.io.IOException: setDataSource failed.
at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1093)
at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1039)
at com.yellowtec.uplinkixm.app.Utils.FfmpegEncoder.checkAndPlayFile(FfmpegEncoder.java:314)
at com.yellowtec.uplinkixm.app.Utils.DownloadHandler.handleMessage(DownloadHandler.java:249)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
所以我的问题是为什么会出现这个错误以及如何为Nougat和Oreo解决这个错误。而且我很困惑,因为这个媒体播放器错误是由于Android媒体播放器功能[https://developer.android.com/guide/topics/media/mediaplayer.html]或 由于FFmpeg。