tcking / GiraffePlayer2

out of the box android video player(support lazy load, ListView/RecyclerView and hight performance)
Apache License 2.0
377 stars 110 forks source link

Error inflating class tcking.github.com.giraffeplayer2.VideoView #156

Closed prakashmp closed 5 years ago

prakashmp commented 5 years ago

I using Vivo v9.now am using giraffe video player for to play record video.but am getting a layout to inspect error in vivo v9..this code working in lollipop version.

My error : android.view.InflateException: Binary XML file line #69: Binary XML file line #69: Error inflating class tcking.github.com.giraffeplayer2.VideoView

tcking commented 5 years ago

can you give the error stack

prakashmp commented 5 years ago

FATAL EXCEPTION: main Process: com.emenator.android, PID: 26295 android.view.InflateException: Binary XML file line #69: Binary XML file line #69: Error inflating class tcking.github.com.giraffeplayer2.VideoView Caused by: android.view.InflateException: Binary XML file line #69: Error inflating class tcking.github.com.giraffeplayer2.VideoView Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:334) at android.view.LayoutInflater.createView(LayoutInflater.java:656) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:835) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:775) at android.view.LayoutInflater.rInflate(LayoutInflater.java:908) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:869) at android.view.LayoutInflater.rInflate(LayoutInflater.java:911) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:869) at android.view.LayoutInflater.inflate(LayoutInflater.java:521) at android.view.LayoutInflater.inflate(LayoutInflater.java:429) at android.view.LayoutInflater.inflate(LayoutInflater.java:380) at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:535) at android.app.Dialog.setContentView(Dialog.java:548) at com.emenator.android.wowza.WowzaPresenterActivity.RecordedVideoDialog(WowzaPresenterActivity.java:1443) at com.emenator.android.wowza.WowzaPresenterActivity.access$100(WowzaPresenterActivity.java:134) at com.emenator.android.wowza.WowzaPresenterActivity$5.onClick(WowzaPresenterActivity.java:428) at android.view.View.performClick(View.java:6319) at android.view.View$PerformClick.run(View.java:24939) at android.os.Handler.handleCallback(Handler.java:790) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:192) at android.app.ActivityThread.main(ActivityThread.java:6703) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:826) Caused by: java.lang.ClassCastException: android.view.ContextThemeWrapper cannot be cast to android.app.Activity at tcking.github.com.giraffeplayer2.VideoView.init(VideoView.java:79) at tcking.github.com.giraffeplayer2.VideoView.(VideoView.java:62) at java.lang.reflect.Constructor.newInstance0(Native Method)  at java.lang.reflect.Constructor.newInstance(Constructor.java:334)  at android.view.LayoutInflater.createView(LayoutInflater.java:656)  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:835)  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:775)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:908)  at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:869)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:911)  at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:869)  at android.view.LayoutInflater.inflate(LayoutInflater.java:521)  at android.view.LayoutInflater.inflate(LayoutInflater.java:429)  at android.view.LayoutInflater.inflate(LayoutInflater.java:380)  at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:535)  at android.app.Dialog.setContentView(Dialog.java:548)  at com.emenator.android.wowza.WowzaPresenterActivity.RecordedVideoDialog(WowzaPresenterActivity.java:1443)  at com.emenator.android.wowza.WowzaPresenterActivity.access$100(WowzaPresenterActivity.java:134)  at com.emenator.android.wowza.WowzaPresenterActivity$5.onClick(WowzaPresenterActivity.java:428)  at android.view.View.performClick(View.java:6319)  at android.view.View$PerformClick.run(View.java:24939)  at android.os.Handler.handleCallback(Handler.java:790)  at android.os.Handler.dispatchMessage(Handler.java:99)  at android.os.Looper.loop(Looper.java:192)  at android.app.ActivityThread.main(ActivityThread.java:6703)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:826)  03-18 16:31:24.504 26295-26295/com.emenator.android E/UncaughtException: android.view.InflateException: Binary XML file line #69: Binary XML file line #69: Error inflating class tcking.github.com.giraffeplayer2.VideoView Caused by: android.view.InflateException: Binary XML file line #69: Error inflating class tcking.github.com.giraffeplayer2.VideoView Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:334) at android.view.LayoutInflater.createView(LayoutInflater.java:656) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:835) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:775) at android.view.LayoutInflater.rInflate(LayoutInflater.java:908) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:869) at android.view.LayoutInflater.rInflate(LayoutInflater.java:911) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:869) at android.view.LayoutInflater.inflate(LayoutInflater.java:521) at android.view.LayoutInflater.inflate(LayoutInflater.java:429) at android.view.LayoutInflater.inflate(LayoutInflater.java:380) at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:535) at android.app.Dialog.setContentView(Dialog.java:548) at com.emenator.android.wowza.WowzaPresenterActivity.RecordedVideoDialog(WowzaPresenterActivity.java:1443) at com.emenator.android.wowza.WowzaPresenterActivity.access$100(WowzaPresenterActivity.java:134) at com.emenator.android.wowza.WowzaPresenterActivity$5.onClick(WowzaPresenterActivity.java:428) at android.view.View.performClick(View.java:6319) at android.view.View$PerformClick.run(View.java:24939) at android.os.Handler.handleCallback(Handler.java:790) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:192) at android.app.ActivityThread.main(ActivityThread.java:6703) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:826) Caused by: java.lang.ClassCastException: android.view.ContextThemeWrapper cannot be cast to android.app.Activity at tcking.github.com.giraffeplayer2.VideoView.init(VideoView.java:79) at tcking.github.com.giraffeplayer2.VideoView.(VideoView.java:62) at java.lang.reflect.Constructor.newInstance0(Native Method)  at java.lang.reflect.Constructor.newInstance(Constructor.java:334)  at android.view.LayoutInflater.createView(LayoutInflater.java:656)  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:835)  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:775)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:908)  at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:869)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:911)  at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:869)  at android.view.LayoutInflater.inflate(LayoutInflater.java:521)  at android.view.LayoutInflater.inflate(LayoutInflater.java:429)  at android.view.LayoutInflater.inflate(LayoutInflater.java:380)  at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:535)  at android.app.Dialog.setContentView(Dialog.java:548)  at com.emenator.android.wowza.WowzaPresenterActivity.RecordedVideoDialog(WowzaPresenterActivity.java:1443)  at com.emenator.android.wowza.WowzaPresenterActivity.access$100(WowzaPresenterActivity.java:134)  at com.emenator.android.wowza.WowzaPresenterActivity$5.onClick(WowzaPresenterActivity.java:428)  at android.view.View.performClick(View.java:6319)  at android.view.View$PerformClick.run(View.java:24939)  at android.os.Handler.handleCallback(Handler.java:790)  at android.os.Handler.dispatchMessage(Handler.java:99)  at android.os.Looper.loop(Looper.java:192)  at android.app.ActivityThread.main(ActivityThread.java:6703)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:826) 

tcking commented 5 years ago

please reference https://github.com/tcking/GiraffePlayer2/issues/154

prakashmp commented 5 years ago

yeah #154 solution work for me thank you :)