Inflate exception
See original GitHub issue- [x ] I have verified there are no duplicate active or recent bugs, questions, or requests
I’ve read through the other closed issues that have to do with inflation, and I can’t seem to keep it from crashing when trying to load the videoview. It works with normal VideoView. It is an Android TV app. Any advice at all would be appreciated!
Include the following:
- ExoMedia version:
3.1.1
- Device OS version:
7.1.1
- Devide Manufacturer:
Android TV Emulator
- Device Name:
Emulator
Reproduction Steps
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '25.0.0'
defaultConfig {
applicationId "com.flexline"
minSdkVersion 23
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
/*
Split up layout folder into subfolders
See: http://stackoverflow.com/questions/4930398/can-the-android-layout-folder-contain-subfolders
See: http://stackoverflow.com/questions/41778101/uri-is-not-registered-http-schemas-android-com-apk-res-android
*/
sourceSets {
main {
res.srcDirs =
[
'src/main/res/layouts/assessment',
'src/main/res/layouts/main',
'src/main/res/layouts/onboarding',
'src/main/res/layouts/summary',
'src/main/res/layouts/user',
'src/main/res/layouts/workout',
'src/main/res/layouts',
'src/main/res'
]
}
}
compileOptions {
targetCompatibility JavaVersion.VERSION_1_7
sourceCompatibility JavaVersion.VERSION_1_7
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:2.6.4'
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
// Because RxAndroid releases are few and far between, it is recommended you also
// explicitly depend on RxJava's latest version for bug fixes and new features.
compile 'io.reactivex.rxjava2:rxjava:2.0.1'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
// Note: The gson converter version needs to match the retrofit version
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
// Note: Built-in retrofit-rxjava adapter only works with rxjava1
compile 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
// Error reporting for Sentry
compile 'com.getsentry.raven:raven-android:7.8.1'
compile 'com.google.dagger:dagger:2.8'
annotationProcessor 'com.google.dagger:dagger-compiler:2.8'
// Horizontal Grid View
compile 'com.android.support:leanback-v17:25.3.1'
// Picasso (to load images in Grid View)
compile 'com.squareup.picasso:picasso:2.5.2'
// Exoplayer wrapper that functions like VideoView
compile 'com.devbrackets.android:exomedia:3.1.1'
}
Layout
<com.devbrackets.android.exomedia.ui.widget.EMVideoView
android:id="@+id/workout_video"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerHorizontal="true" />
Expected Result
Actual Result
FATAL EXCEPTION: main
Process: com.flexline, PID: 9886
android.view.InflateException: Binary XML file line #6: Binary XML file line #6: Error inflating class com.devbrackets.android.exomedia.ui.widget.EMVideoView
Caused by: android.view.InflateException: Binary XML file line #6: Error inflating class com.devbrackets.android.exomedia.ui.widget.EMVideoView
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:430)
at android.view.LayoutInflater.createView(LayoutInflater.java:645)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:858)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.inflate(LayoutInflater.java:518)
at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
at com.flexline.workout.WorkoutFragment.onCreateView(WorkoutFragment.java:126)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:2192)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1299)
at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1528)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1595)
at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:758)
at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2363)
at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2149)
at android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps(FragmentManager.java:2103)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2013)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:710)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Caused by: android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class com.devbrackets.android.exomedia.core.video.exo.ExoTextureVideoView
Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class com.devbrackets.android.exomedia.core.video.exo.ExoTextureVideoView
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:430)
at android.view.LayoutInflater.createView(LayoutInflater.java:645)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
at android.view.ViewStub.inflate(ViewStub.java:259)
at com.devbrackets.android.exomedia.ui.widget.EMVideoView.inflateVideoView(EMVideoView.java:716)
at com.devbrackets.android.exomedia.ui.widget.EMVideoView.initView(EMVideoView.java:681)
at com.devbrackets.android.exomedia.ui.widget.EMVideoView.setup(EMVideoView.java:668)
at com.devbrackets.android.exomedia.ui.widget.EMVideoView.<init>(EMVideoView.java:108)
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:430)
at android.view.LayoutInflater.createView(LayoutInflater.java:645)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787)
04-22 02:34:48.124 9886-9886/com.flexline E/AndroidRuntime: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:858)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.inflate(LayoutInflater.java:518)
at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
at com.flexline.workout.WorkoutFragment.onCreateView(WorkoutFragment.java:126)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:2192)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1299)
at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1528)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1595)
at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:758)
at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2363)
at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2149)
at android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps(FragmentManager.java:2103)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2013)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:710)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Caused by: java.lang.UnsupportedOperationException: TextureView doesn't support displaying a background drawable
at android.view.TextureView.setBackgroundDrawable(TextureView.java:316)
at android.view.View.setBackground(View.java:18247)
at android.view.View.<init>(View.java:4600)
at android.view.View.<init>(View.java:4109)
at android.view.View.<init>(View.java:4088)
at android.view.TextureView.<init>(TextureView.java:146)
at com.devbrackets.android.exomedia.core.video.ResizingTextureView.<init>(ResizingTextureView.java:123)
at com.devbrackets.android.exomedia.core.video.exo.ExoTextureVideoView.<init>(ExoTextureVideoView.java:55)
... 39 more
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Binary XML file line #12: Error inflating class <unknown>
A common issue is an out of memory exception when trying to inflate an ImageView loading a drawable resource. If one of these...
Read more >InflateException - Android Developers
InflateException. bookmark_border. Stay organized with collections Save and categorize content based on your preferences. Dismiss
Read more >Help me fix this Android.Views.InflateException - Microsoft Q&A
InflateException. Hi. I try to use Fingerprint plugin. In PCL project my MainPage derives from Shell and this is a problem. If the...
Read more >android.view.InflateException Java Examples
This page shows Java code examples of android.view.InflateException.
Read more >Binary XML file line #0: Error inflating class android.widget ...
It happens to ZenFone 2 device, Android 5.0 Im using this lib version 2.3.0 Fatal Exception: java.lang.RuntimeException: Unable to start ...
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
Thanks again, I appreciate your help. Setting to @null didn’t work but I’m sure I can adapt and make things work.
Yes, this is how the styes/themes work. By specifying the
android:background
in the root theme it will apply to all views that don’t manually specify a background. You can probably change this by setting the theme for theEMVideoView
with aandroid:background">@null
(I haven’t tried this so it may still not work correctly)