java.lang.ClassCastException: java.lang.Object cannot be cast to android.util.Pair
Open
@oceanjules is already working on this.
Since Jul 9, 2026.
bug
- Dominant language
- Java
- Stars
- 3k
- Forks
- 955
- Avg merge
- 12d 14h
- Merged PRs (30d)
- 2
Description
Version
Media3 1.10.1
More version details
No response
Devices that reproduce the issue
Meizu 17 running android 13
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
No
Reproduction steps
player.run {
playWhenReady = false
repeatMode = ExoPlayer.REPEAT_MODE_OFF
val source = mediaSource
if (source != null) {
setMediaSource(source)
seekTo(0) //
player.prepare()
playerView.player = player
if (pendingPlayRequestUponSetupPlayer) {
playerPool.play(player)
pendingPlayRequestUponSetupPlayer = false
}
} else {
playerView.player = null
}
}
Expected result
The media plays successfully
Actual result
java.lang.ClassCastException: java.lang.Object cannot be cast to android.util.Pair
at androidx.media3.exoplayer.AbstractConcatenatedTimeline.getChildTimelineUidFromConcatenatedUid(AbstractConcatenatedTimeline.java:43)
at androidx.media3.exoplayer.AbstractConcatenatedTimeline.getPeriodByUid(AbstractConcatenatedTimeline.java:217)
at androidx.media3.exoplayer.ExoPlayerImpl.periodPositionUsToWindowPositionUs(ExoPlayerImpl.java:2911)
at androidx.media3.exoplayer.ExoPlayerImpl.getCurrentPositionUsInternal(ExoPlayerImpl.java:2191)
at androidx.media3.exoplayer.ExoPlayerImpl.seekTo(ExoPlayerImpl.java:984)
at androidx.media3.common.BasePlayer.seekToCurrentItem(BasePlayer.java:414)
at androidx.media3.common.BasePlayer.seekTo(BasePlayer.java:208)
Media
Not applicable
Bug Report
- You will email the zip file produced by
adb bugreportto android-media-github@google.com after filing this issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.