Error inflating class com.jarvanmo.exoplayerview.ui.ExoVideoView
See original GitHub issueI just added gradle dependency, then added the ExoVideoView in my layout file and properly handled its working in the Java section. But this exception comes when I launch the activity that contains ExoVideoView.
Caused by: android.view.InflateException: Binary XML file line #15: Error inflating class com.jarvanmo.exoplayerview.ui.ExoVideoView
at android.view.LayoutInflater.createView(LayoutInflater.java:620)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:289)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
at com.dozydroid.fmp.activities.VideoPlayerActivity.onCreate(VideoPlayerActivity.java:197)
at android.app.Activity.performCreate(Activity.java:5343)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1088)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2331)
Here’s peek from my build.gradle
compile 'com.google.android.exoplayer:exoplayer:r2.5.4'
compile 'com.jarvanmo:exoplayerview:1.1.0'
compile 'com.android.support:cardview-v7:26.+'
compile 'com.android.support:support-v4:26.+'
testCompile 'junit:junit:4.12'
My layout.xml
file:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:keepScreenOn="true"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="#000"
tools:context=".activities.VideoPlayerActivity">
<com.jarvanmo.exoplayerview.ui.ExoVideoView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/player_view"
app:resize_mode="fit"/>
</RelativeLayout>
My Activity.java
file:
private ExoVideoView exoVideoView;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
exoVideoView = (ExoVideoView) findViewById(R.id.player_view);
exoVideoView.setPlayer(exoPlayer);
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:18 (9 by maintainers)
Top Results From Across the Web
Error inflating class com.google.android.exoplayer2.ui ...
Seems it's a known issue, which the docs say you should use this (found solution here) : compileOptions { targetCompatibility JavaVersion.
Read more >Error inflating class com.google.android.exoplayer2.ui ...
I am currently using latest version of ExoPlayer that is 2.10.5, i got the following exception on production environment android.view.
Read more >Error inflating class com google android exoplayer2 - YouTube
Subscribe My channel to get more Updated Videos - https://bit.ly/35R1t3JError inflating class com.google.android.exoplayer2. ui.
Read more >com.google.android.exoplayer2.SimpleExoPlayer Java Exaples
This page shows Java code examples of com.google.android.exoplayer2.SimpleExoPlayer.
Read more >Error inflating class com.google.android.exoplayer2.ui ...
InflateException: Binary XML file line #30: Binary XML file line #30: Error inflating class com.google.android.exoplayer2.ui.PlayerView
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
2.0.0 has been released.
forgot to publish
1.1.4
.Now it’s released.