Android 5.0.0 在 Vitami 中崩溃
Android Vitamio 5.0.0 crash
我没能让它工作 vitamio。一切似乎都正确,但应用程序停止了,并且您收到此错误。
我做错了什么?
与 vitamio 4.2 完全相同的代码完美运行。我想我做错了什么
> import android.support.v7.app.AppCompatActivity;
> import android.os.Bundle;
> import io.vov.vitamio.MediaPlayer;
> import io.vov.vitamio.Vitamio;
> import io.vov.vitamio.widget.MediaController;
> import io.vov.vitamio.widget.VideoView;
>
>
> public class Rtmp_player extends AppCompatActivity {
>
>
> private static final String TAG = "MainActivity";
> private String path;
> //private HashMap<String, String> options;
> private VideoView mVideoView;
>
> @Override
> protected void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> Vitamio.isInitialized(this);
> setContentView(R.layout.activity_rtmp_player);
> mVideoView = (VideoView) findViewById(R.id.vitamio_videoView);
> path = "http://80.86.107.169:8100/stream.flv";
> mVideoView.setVideoPath(path);
> //mVideoView.setVideoURI(Uri.parse(path), options);
> mVideoView.setMediaController(new MediaController(this));
> mVideoView.requestFocus();
> mVideoView.start();
>
> mVideoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
> @Override
> public void onPrepared(MediaPlayer mediaPlayer) {
> mediaPlayer.setPlaybackSpeed(1.0f);
> }
> });
> } }
记录错误
01-22 16:37:25.101 27911-27992/ro.vrt.videoplayerstreaming I/OpenGLRenderer: Initialized EGL, version 1.4
01-22 16:37:25.179 27911-27911/ro.vrt.videoplayerstreaming I/Vitamio[5.0.0][Player]: Copyright (c) YIXIA (http://yixia.com).
THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com)
01-22 16:37:25.179 27911-27911/ro.vrt.videoplayerstreaming I/Vitamio[5.0.0][Player]: LOAD FFMPEG START: /data/user/0/ro.vrt.videoplayerstreaming/lib/libffmpeg.so
01-22 16:37:25.188 27911-27911/ro.vrt.videoplayerstreaming E/linker: /data/app/ro.vrt.videoplayerstreaming-2/lib/arm/libffmpeg.so: has text relocations
01-22 16:37:25.188 27911-27911/ro.vrt.videoplayerstreaming E/Vitamio[5.0.0][Player]: LOAD FFMPEG ERROR: dlopen failed: /data/app/ro.vrt.videoplayerstreaming-2/lib/arm/libffmpeg.so: has text relocations
01-22 16:37:25.188 27911-27911/ro.vrt.videoplayerstreaming I/Vitamio[5.0.0][Player]: LOAD VVO START: /data/user/0/ro.vrt.videoplayerstreaming/lib/libvvo.9.so
01-22 16:37:25.203 27911-27911/ro.vrt.videoplayerstreaming E/Vitamio[5.0.0][Player]: FIND_NAME_SYM vvo, render_yuv
01-22 16:37:25.203 27911-27911/ro.vrt.videoplayerstreaming I/Vitamio[5.0.0][Player]: LOAD VVO END: /data/user/0/ro.vrt.videoplayerstreaming/lib/libvvo.9.so
01-22 16:37:25.203 27911-27911/ro.vrt.videoplayerstreaming I/Vitamio[5.0.0][Player]: LOAD VAO START: /data/user/0/ro.vrt.videoplayerstreaming/lib/libvao.0.so
01-22 16:37:25.214 27911-27911/ro.vrt.videoplayerstreaming I/Vitamio[5.0.0][Player]: LOAD VAO END: /data/user/0/ro.vrt.videoplayerstreaming/lib/libvao.0.so
01-22 16:37:25.216 27911-27911/ro.vrt.videoplayerstreaming I/Vitamio[5.0.0][Player]: VPLAYER INIT BEGIN
01-22 16:37:25.216 27911-27911/ro.vrt.videoplayerstreaming I/Vitamio[5.0.0][Player]: Vitamio Version 5.0.0
01-22 16:37:25.216 27911-27911/ro.vrt.videoplayerstreaming I/Vitamio[5.0.0][Player]: Application package name: ro.vrt.videoplayerstreaming
01-22 16:37:25.216 27911-27911/ro.vrt.videoplayerstreaming A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 27911 (playerstreaming)
/data/app/ro.vrt.videoplayerstreaming-2/lib/arm/libffmpeg.so: has text relocations
你没有做错,但你的目标是 android M,它不支持文本重定位。由 vitamio 来纠正这个问题。请参考https://code.google.com/p/android-developer-preview/issues/detail?id=3028 and https://github.com/yixia/VitamioBundle/issues/312。有一种解决方法可以设置 targetSDKVersion<23,但如果您针对某些 marshmallow 功能,则不推荐使用。
我没能让它工作 vitamio。一切似乎都正确,但应用程序停止了,并且您收到此错误。 我做错了什么? 与 vitamio 4.2 完全相同的代码完美运行。我想我做错了什么
> import android.support.v7.app.AppCompatActivity;
> import android.os.Bundle;
> import io.vov.vitamio.MediaPlayer;
> import io.vov.vitamio.Vitamio;
> import io.vov.vitamio.widget.MediaController;
> import io.vov.vitamio.widget.VideoView;
>
>
> public class Rtmp_player extends AppCompatActivity {
>
>
> private static final String TAG = "MainActivity";
> private String path;
> //private HashMap<String, String> options;
> private VideoView mVideoView;
>
> @Override
> protected void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> Vitamio.isInitialized(this);
> setContentView(R.layout.activity_rtmp_player);
> mVideoView = (VideoView) findViewById(R.id.vitamio_videoView);
> path = "http://80.86.107.169:8100/stream.flv";
> mVideoView.setVideoPath(path);
> //mVideoView.setVideoURI(Uri.parse(path), options);
> mVideoView.setMediaController(new MediaController(this));
> mVideoView.requestFocus();
> mVideoView.start();
>
> mVideoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
> @Override
> public void onPrepared(MediaPlayer mediaPlayer) {
> mediaPlayer.setPlaybackSpeed(1.0f);
> }
> });
> } }
记录错误
01-22 16:37:25.101 27911-27992/ro.vrt.videoplayerstreaming I/OpenGLRenderer: Initialized EGL, version 1.4
01-22 16:37:25.179 27911-27911/ro.vrt.videoplayerstreaming I/Vitamio[5.0.0][Player]: Copyright (c) YIXIA (http://yixia.com).
THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com)
01-22 16:37:25.179 27911-27911/ro.vrt.videoplayerstreaming I/Vitamio[5.0.0][Player]: LOAD FFMPEG START: /data/user/0/ro.vrt.videoplayerstreaming/lib/libffmpeg.so
01-22 16:37:25.188 27911-27911/ro.vrt.videoplayerstreaming E/linker: /data/app/ro.vrt.videoplayerstreaming-2/lib/arm/libffmpeg.so: has text relocations
01-22 16:37:25.188 27911-27911/ro.vrt.videoplayerstreaming E/Vitamio[5.0.0][Player]: LOAD FFMPEG ERROR: dlopen failed: /data/app/ro.vrt.videoplayerstreaming-2/lib/arm/libffmpeg.so: has text relocations
01-22 16:37:25.188 27911-27911/ro.vrt.videoplayerstreaming I/Vitamio[5.0.0][Player]: LOAD VVO START: /data/user/0/ro.vrt.videoplayerstreaming/lib/libvvo.9.so
01-22 16:37:25.203 27911-27911/ro.vrt.videoplayerstreaming E/Vitamio[5.0.0][Player]: FIND_NAME_SYM vvo, render_yuv
01-22 16:37:25.203 27911-27911/ro.vrt.videoplayerstreaming I/Vitamio[5.0.0][Player]: LOAD VVO END: /data/user/0/ro.vrt.videoplayerstreaming/lib/libvvo.9.so
01-22 16:37:25.203 27911-27911/ro.vrt.videoplayerstreaming I/Vitamio[5.0.0][Player]: LOAD VAO START: /data/user/0/ro.vrt.videoplayerstreaming/lib/libvao.0.so
01-22 16:37:25.214 27911-27911/ro.vrt.videoplayerstreaming I/Vitamio[5.0.0][Player]: LOAD VAO END: /data/user/0/ro.vrt.videoplayerstreaming/lib/libvao.0.so
01-22 16:37:25.216 27911-27911/ro.vrt.videoplayerstreaming I/Vitamio[5.0.0][Player]: VPLAYER INIT BEGIN
01-22 16:37:25.216 27911-27911/ro.vrt.videoplayerstreaming I/Vitamio[5.0.0][Player]: Vitamio Version 5.0.0
01-22 16:37:25.216 27911-27911/ro.vrt.videoplayerstreaming I/Vitamio[5.0.0][Player]: Application package name: ro.vrt.videoplayerstreaming
01-22 16:37:25.216 27911-27911/ro.vrt.videoplayerstreaming A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 27911 (playerstreaming)
/data/app/ro.vrt.videoplayerstreaming-2/lib/arm/libffmpeg.so: has text relocations
你没有做错,但你的目标是 android M,它不支持文本重定位。由 vitamio 来纠正这个问题。请参考https://code.google.com/p/android-developer-preview/issues/detail?id=3028 and https://github.com/yixia/VitamioBundle/issues/312。有一种解决方法可以设置 targetSDKVersion<23,但如果您针对某些 marshmallow 功能,则不推荐使用。