skydoves / PowerMenu

:fire: Powerful and modernized popup menu with fully customizable animations.
Apache License 2.0
1.19k stars 174 forks source link

android.view.InflateException: Binary XML file line #12 in package:layout/item_power_menu_library_skydoves #101

Open itsonegeneral opened 1 year ago

itsonegeneral commented 1 year ago

Please complete the following information:

android.view.InflateException: Binary XML file line #12 in package:layout/item_power_menu_library_skydoves: Binary XML file line #12 in package:layout/item_power_menu_library_skydoves: Error inflating class

Not able to show popup menu in the activity, I'm using val card =findViewById(R.id.rl) powerMenu.showAsDropDown(card)

this code to show popup, had tried different views and viewbinding also, but still getting the same error Anything I'm missing like themes or other required libraries ?

itsonegeneral commented 1 year ago

Attaching more error log E/AndroidRuntime: FATAL EXCEPTION: main Process: package PID: 25051 android.view.InflateException: Binary XML file line #12 in package:layout/item_power_menu_library_skydoves: Binary XML file line #12 in package:layout/item_power_menu_library_skydoves: Error inflating class Caused by: android.view.InflateException: Binary XML file line #12 in package:layout/item_power_menu_library_skydoves: 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.inflate(LayoutInflater.java:663) at android.view.LayoutInflater.inflate(LayoutInflater.java:538) at com.skydoves.powermenu.databinding.ItemPowerMenuLibrarySkydovesBinding.inflate(ItemPowerMenuLibrarySkydovesBinding.java:54) at com.skydoves.powermenu.MenuListAdapter.getView(MenuListAdapter.java:66) at android.widget.AbsListView.obtainView(AbsListView.java:2398) at android.widget.ListView.measureHeightOfChildren(ListView.java:1417) at android.widget.ListView.onMeasure(ListView.java:1323) at android.view.View.measure(View.java:25773) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6980) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at androidx.cardview.widget.CardView.onMeasure(CardView.java:260) at android.view.View.measure(View.java:25773) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6980) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.view.View.measure(View.java:25773) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6980) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.view.View.measure(View.java:25773) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6980) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.view.View.measure(View.java:25773) at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:3608) at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:2380) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2677) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2126) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8649) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1037) at android.view.Choreographer.doCallbacks(Choreographer.java:845) at android.view.Choreographer.doFrame(Choreographer.java:780) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1022) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7842) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003) Caused by: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 35: TypedValue{t=0x2/d=0x7f030363 a=-1} at android.content.res.TypedArray.getDrawableForDensity(TypedArray.java:998) at android.content.res.TypedArray.getDrawable(TypedArray.java:982) E/AndroidRuntime: at android.view.View.(View.java:5870) at android.view.ViewGroup.(ViewGroup.java:702) at android.widget.LinearLayout.(LinearLayout.java:254) at android.widget.LinearLayout.(LinearLayout.java:250) at android.widget.LinearLayout.(LinearLayout.java:246)