StackOverflower
StackOverflower

Reputation: 437

How to sync ExoPlayer library in Android?

My app crashed when it comes to sync ExoPlayer library. At first, it crashes when I had Android Studio 3.6 and for no reason it gave me following errors: enter image description here

enter image description here

but recently I updated Android Studio to 4.0 so I can sync ExoPlayer libraries and no problem when running app

implementation 'com.google.android.exoplayer:exoplayer-core:2.11.4'
implementation 'com.google.android.exoplayer:exoplayer-dash:2.11.4'
implementation 'com.google.android.exoplayer:exoplayer-ui:2.11.4'

but when I add XML code as you see in the following

<com.google.android.exoplayer2.ui.SimpleExoPlayerView
        android:id="@+id/video_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"/>

and run my app it crashes and gives me the following error:

2020-05-30 12:39:59.271 18182-18182/? E/Zygote: isWhitelistProcess - Process 
is Whitelisted
2020-05-30 12:39:59.271 18182-18182/? E/libpersona: scanKnoxPersonas
2020-05-30 12:39:59.271 18182-18182/? E/libpersona: Couldn't open the File - 
/data/system/users/0/personalist.xml - No such file or directory
2020-05-30 12:40:00.364 18182-18182/com.example.myapplication A/libc: Fatal 
signal 11 (SIGSEGV), code 
1, fault addr 0xb5a9f98 in tid 18182 (e.myapplication), pid 18182 
(e.myapplication)

Upvotes: 2

Views: 1827

Answers (2)

Yasin Hajilou
Yasin Hajilou

Reputation: 329

Make Sure you are implemented all below steps :

1- Add repositories:

you should add add these repos exactly with writted order. (buld.gradle:project)

repositories {
    google()
    mavenCentral()
}

2- Add ExoPlayer full module dependency

    implementation 'com.google.android.exoplayer:exoplayer:2.11.4'

3- Turn on Java 8 support (buld.gradle - module:app)

  android{
     ...
    compileOptions {
      targetCompatibility JavaVersion.VERSION_1_8
    }
 }

Upvotes: 2

Hank Chan
Hank Chan

Reputation: 1876

Follow up on @Yasin's answer.

With Google's decision to sunset jcenter in 2022, you might run into another problem - that is your current old version of ExoPlayer is only provided on jcenter but not on google. So I would suggest you to migrate to latest version of ExoPlayer, i.e. v15, as soon as possible - which is guaranteed to be found on google.

Upvotes: 0

Related Questions