AsynctaskCoffee / YoutubeFloatingVideo

Simple Youtube Floating Video Library
Apache License 2.0
38 stars 10 forks source link

android.view.InflateException: Binary XML file line #42 - layout/youtube_pip_layout #8

Open sarathsvs opened 3 years ago

sarathsvs commented 3 years ago

Caused by: android.view.InflateException: Binary XML file line #42 in com.appstest12.youtube2pip:layout/youtube_pip_layout: Error inflating class Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:343) at android.view.LayoutInflater.createView(LayoutInflater.java:854) at android.view.LayoutInflater.createView(LayoutInflater.java:776) at com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:58) at android.view.LayoutInflater.onCreateView(LayoutInflater.java:930) at android.view.LayoutInflater.onCreateView(LayoutInflater.java:950) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1004) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:961) at android.view.LayoutInflater.rInflate(LayoutInflater.java:1123) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1084) at android.view.LayoutInflater.rInflate(LayoutInflater.java:1126) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1084) at android.view.LayoutInflater.rInflate(LayoutInflater.java:1126) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1084) at android.view.LayoutInflater.rInflate(LayoutInflater.java:1126) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1084) at android.view.LayoutInflater.rInflate(LayoutInflater.java:1126) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1084) at android.view.LayoutInflater.inflate(LayoutInflater.java:682) at android.view.LayoutInflater.inflate(LayoutInflater.java:534) at android.view.LayoutInflater.inflate(LayoutInflater.java:481) at com.pipvideo.youtubepipvideoplayer.TaskCoffeeVideo.coffeeVideoSetup(TaskCoffeeVideo.java:147) at com.appstest12.youtube2pip.MainActivity$onCreate$1.onClick(MainActivity.kt:30) at android.view.View.performClick(View.java:7125) at android.view.View.performClickInternal(View.java:7102) at android.view.View.access$3500(View.java:801) at android.view.View$PerformClick.run(View.java:27336) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) Caused by: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 35: TypedValue{t=0x2/d=0x7f0302aa a=-1} at android.content.res.TypedArray.getDrawableForDensity(TypedArray.java:996) at android.content.res.TypedArray.getDrawable(TypedArray.java:980) at android.view.View.(View.java:5601) at android.widget.ImageView.(ImageView.java:193) at android.widget.ImageView.(ImageView.java:188) at android.widget.ImageView.(ImageView.java:184) at java.lang.reflect.Constructor.newInstance0(Native Method)  at java.lang.reflect.Constructor.newInstance(Constructor.java:343)  at android.view.LayoutInflater.createView(LayoutInflater.java:854)  at android.view.LayoutInflater.createView(LayoutInflater.java:776)  at com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:58)  at android.view.LayoutInflater.onCreateView(LayoutInflater.java:930)  at android.view.LayoutInflater.onCreateView(LayoutInflater.java:950)  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1004)  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:961)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:1123)  at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1084)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:1126)  at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1084)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:1126)  at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1084)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:1126)  at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1084)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:1126)  at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1084)  at android.view.LayoutInflater.inflate(LayoutInflater.java:682)  at android.view.LayoutInflater.inflate(LayoutInflater.java:534)  at android.view.LayoutInflater.inflate(LayoutInflater.java:481)  at com.pipvideo.youtubepipvideoplayer.TaskCoffeeVideo.coffeeVideoSetup(TaskCoffeeVideo.java:147)  at com.appstest12.youtube2pip.MainActivity$onCreate$1.onClick(MainActivity.kt:30)  at android.view.View.performClick(View.java:7125)  at android.view.View.performClickInternal(View.java:7102)  at android.view.View.access$3500(View.java:801)  at android.view.View$PerformClick.run(View.java:27336)  at android.os.Handler.handleCallback(Handler.java:883)  at android.os.Handler.dispatchMessage(Handler.java:100)  at android.os.Looper.loop(Looper.java:214)  at android.app.ActivityThread.main(ActivityThread.java:7356)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) 

Rsinghpawar commented 3 years ago

did you find any solution for this issue??

Rsinghpawar commented 3 years ago

Binary XML file line #42 in com.ovunque.parkwheels:layout/youtube_pip_layout: Binary XML file line #42 in com.ovunque.parkwheels:layout/youtube_pip_layout: Error inflating class Caused by: android.view.InflateException: Binary XML file line #42 in com.ovunque.parkwheels:layout/youtube_pip_layout: Error inflating class Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:343) at android.view.LayoutInflater.createView(LayoutInflater.java:858) at android.view.LayoutInflater.createView(LayoutInflater.java:780) at com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:58) at android.view.LayoutInflater.onCreateView(LayoutInflater.java:934) at android.view.LayoutInflater.onCreateView(LayoutInflater.java:954) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1008) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:965) at android.view.LayoutInflater.rInflate(LayoutInflater.java:1127) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1088) at android.view.LayoutInflater.rInflate(LayoutInflater.java:1130) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1088) at android.view.LayoutInflater.rInflate(LayoutInflater.java:1130) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1088) at android.view.LayoutInflater.rInflate(LayoutInflater.java:1130) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1088) at android.view.LayoutInflater.rInflate(LayoutInflater.java:1130) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1088) at android.view.LayoutInflater.inflate(LayoutInflater.java:686) at android.view.LayoutInflater.inflate(LayoutInflater.java:538) at android.view.LayoutInflater.inflate(LayoutInflater.java:481) at com.pipvideo.youtubepipvideoplayer.TaskCoffeeVideo.coffeeVideoSetup(TaskCoffeeVideo.java:147) at com.example.vehicleservices.pages.fastageRechargePage.FastagVehicleRechargeAct$setClickListeners$1.onClick(FastagVehicleRechargeAct.kt:101) at android.view.View.performClick(View.java:7189) at com.google.android.material.button.MaterialButton.performClick(MaterialButton.java:992) at android.view.View.performClickInternal(View.java:7166) at android.view.View.access$3500(View.java:819) at android.view.View$PerformClick.run(View.java:27682) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:224) at android.app.ActivityThread.main(ActivityThread.java:7592) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950) Caused by: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 35: TypedValue{t=0x2/d=0x7f040340 a=-1} at android.content.res.TypedArray.getDrawableForDensity(TypedArray.java:998) at android.content.res.TypedArray.getDrawable(TypedArray.java:982) at android.view.View.(View.java:5655) at android.widget.ImageView.(ImageView.java:193) at android.widget.ImageView.(ImageView.java:188) at android.widget.ImageView.(ImageView.java:184) at java.lang.reflect.Constructor.newInstance0(Native Method)  at java.lang.reflect.Constructor.newInstance(Constructor.java:343)  at android.view.LayoutInflater.createView(LayoutInflater.java:858)  at android.view.LayoutInflater.createView(LayoutInflater.java:780)  at com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:58)  at android.view.LayoutInflater.onCreateView(LayoutInflater.java:934)  at android.view.LayoutInflater.onCreateView(LayoutInflater.java:954)  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1008)  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:965)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:1127)  at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1088)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:1130)  at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1088)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:1130)  at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1088)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:1130)  at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1088)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:1130)  at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1088)  at android.view.LayoutInflater.inflate(LayoutInflater.java:686)  at android.view.LayoutInflater.inflate(LayoutInflater.java:538)  at android.view.LayoutInflater.inflate(LayoutInflater.java:481)  at com.pipvideo.youtubepipvideoplayer.TaskCoffeeVideo.coffeeVideoSetup(TaskCoffeeVideo.java:147)  at com.example.vehicleservices.pages.fastageRechargePage.FastagVehicleRechargeAct$setClickListeners$1.onClick(FastagVehicleRechargeAct.kt:101)  at android.view.View.performClick(View.java:7189)  at com.google.android.material.button.MaterialButton.performClick(MaterialButton.java:992)  at android.view.View.performClickInternal(View.java:7166)  at android.view.View.access$3500(View.java:819)  at android.view.View$PerformClick.run(View.java:27682)  at android.os.Handler.handleCallback(Handler.java:883)  at android.os.Handler.dispatchMessage(Handler.java:100)  at android.os.Looper.loop(Looper.java:224)  at android.app.ActivityThread.main(ActivityThread.java:7592)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950) 

ashishverma93 commented 3 years ago

This is happening because of the below attribute in the same layout:

android:foreground="?attr/selectableItemBackground"

Just removed the line, it's working fine.