Version 2.0 no-longer works for me, whereas version 1.0.2 worked normally:
Looks like there is an issue inflating R.layout.material_drawer_slider
Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class
at android.view.LayoutInflater.createView(LayoutInflater.java:633)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:55)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:682)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:741)
at android.view.LayoutInflater.inflate(LayoutInflater.java:482)
at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
at com.mikepenz.materialdrawer.Drawer.a(Drawer.java:743)
@jimok82 do you use the default layout implementation without any custom layout?
have you tried to clean your project?
have this problem too
Process: com.s0l.social, PID: 18037
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.s0l.social/com.s0l.social.MainActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2292)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2350)
at android.app.ActivityThread.access$800(ActivityThread.java:163)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1257)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5335)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class
at android.view.LayoutInflater.createView(LayoutInflater.java:626)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:675)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:700)
at android.view.LayoutInflater.inflate(LayoutInflater.java:470)
at android.view.LayoutInflater.inflate(LayoutInflater.java:398)
at com.mikepenz.materialdrawer.Drawer.build(Drawer.java:734)
at com.s0l.social.MainActivity.makeLeftMenu(MainActivity.java:272)
at com.s0l.social.MainActivity.onCreate(MainActivity.java:216)
at android.app.Activity.performCreate(Activity.java:5389)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2256)
聽聽聽聽聽聽聽聽聽聽聽聽at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2350)
聽聽聽聽聽聽聽聽聽聽聽聽at android.app.ActivityThread.access$800(ActivityThread.java:163)
聽聽聽聽聽聽聽聽聽聽聽聽at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1257)
聽聽聽聽聽聽聽聽聽聽聽聽at android.os.Handler.dispatchMessage(Handler.java:102)
聽聽聽聽聽聽聽聽聽聽聽聽at android.os.Looper.loop(Looper.java:157)
聽聽聽聽聽聽聽聽聽聽聽聽at android.app.ActivityThread.main(ActivityThread.java:5335)
聽聽聽聽聽聽聽聽聽聽聽聽at java.lang.reflect.Method.invokeNative(Native Method)
聽聽聽聽聽聽聽聽聽聽聽聽at java.lang.reflect.Method.invoke(Method.java:515)
聽聽聽聽聽聽聽聽聽聽聽聽at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
聽聽聽聽聽聽聽聽聽聽聽聽at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
聽聽聽聽聽聽聽聽聽聽聽聽at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at android.view.LayoutInflater.createView(LayoutInflater.java:600)
聽聽聽聽聽聽聽聽聽聽聽聽at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
聽聽聽聽聽聽聽聽聽聽聽聽at android.view.LayoutInflater.onCreateView(LayoutInflater.java:675)
聽聽聽聽聽聽聽聽聽聽聽聽at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:700)
聽聽聽聽聽聽聽聽聽聽聽聽at android.view.LayoutInflater.inflate(LayoutInflater.java:470)
聽聽聽聽聽聽聽聽聽聽聽聽at android.view.LayoutInflater.inflate(LayoutInflater.java:398)
聽聽聽聽聽聽聽聽聽聽聽聽at com.mikepenz.materialdrawer.Drawer.build(Drawer.java:734)
聽聽聽聽聽聽聽聽聽聽聽聽at com.s0l.social.MainActivity.makeLeftMenu(MainActivity.java:272)
聽聽聽聽聽聽聽聽聽聽聽聽at com.s0l.social.MainActivity.onCreate(MainActivity.java:216)
聽聽聽聽聽聽聽聽聽聽聽聽at android.app.Activity.performCreate(Activity.java:5389)
聽聽聽聽聽聽聽聽聽聽聽聽at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
聽聽聽聽聽聽聽聽聽聽聽聽at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2256)
聽聽聽聽聽聽聽聽聽聽聽聽at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2350)
聽聽聽聽聽聽聽聽聽聽聽聽at android.app.ActivityThread.access$800(ActivityThread.java:163)
聽聽聽聽聽聽聽聽聽聽聽聽at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1257)
聽聽聽聽聽聽聽聽聽聽聽聽at android.os.Handler.dispatchMessage(Handler.java:102)
聽聽聽聽聽聽聽聽聽聽聽聽at android.os.Looper.loop(Looper.java:157)
聽聽聽聽聽聽聽聽聽聽聽聽at android.app.ActivityThread.main(ActivityThread.java:5335)
聽聽聽聽聽聽聽聽聽聽聽聽at java.lang.reflect.Method.invokeNative(Native Method)
聽聽聽聽聽聽聽聽聽聽聽聽at java.lang.reflect.Method.invoke(Method.java:515)
聽聽聽聽聽聽聽聽聽聽聽聽at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
聽聽聽聽聽聽聽聽聽聽聽聽at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
聽聽聽聽聽聽聽聽聽聽聽聽at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: Resource is not a Drawable (color or path): TypedValue{t=0x2/d=0x7f0100aa a=-1}
at android.content.res.Resources.loadDrawable(Resources.java:3012)
at android.content.res.TypedArray.getDrawable(TypedArray.java:602)
at android.view.View.
at android.view.ViewGroup.
at android.widget.LinearLayout.
at android.widget.LinearLayout.
聽聽聽聽聽聽聽聽聽聽聽聽at java.lang.reflect.Constructor.constructNative(Native Method)
聽聽聽聽聽聽聽聽聽聽聽聽at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
聽聽聽聽聽聽聽聽聽聽聽聽at android.view.LayoutInflater.createView(LayoutInflater.java:600)
聽聽聽聽聽聽聽聽聽聽聽聽at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
聽聽聽聽聽聽聽聽聽聽聽聽at android.view.LayoutInflater.onCreateView(LayoutInflater.java:675)
聽聽聽聽聽聽聽聽聽聽聽聽at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:700)
聽聽聽聽聽聽聽聽聽聽聽聽at android.view.LayoutInflater.inflate(LayoutInflater.java:470)
聽聽聽聽聽聽聽聽聽聽聽聽at android.view.LayoutInflater.inflate(LayoutInflater.java:398)
聽聽聽聽聽聽聽聽聽聽聽聽at com.mikepenz.materialdrawer.Drawer.build(Drawer.java:734)
聽聽聽聽聽聽聽聽聽聽聽聽at com.s0l.social.MainActivity.makeLeftMenu(MainActivity.java:272)
聽聽聽聽聽聽聽聽聽聽聽聽at com.s0l.social.MainActivity.onCreate(MainActivity.java:216)
聽聽聽聽聽聽聽聽聽聽聽聽at android.app.Activity.performCreate(Activity.java:5389)
聽聽聽聽聽聽聽聽聽聽聽聽at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
聽聽聽聽聽聽聽聽聽聽聽聽at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2256)
聽聽聽聽聽聽聽聽聽聽聽聽at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2350)
聽聽聽聽聽聽聽聽聽聽聽聽at android.app.ActivityThread.access$800(ActivityThread.java:163)
聽聽聽聽聽聽聽聽聽聽聽聽at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1257)
聽聽聽聽聽聽聽聽聽聽聽聽at android.os.Handler.dispatchMessage(Handler.java:102)
聽聽聽聽聽聽聽聽聽聽聽聽at android.os.Looper.loop(Looper.java:157)
聽聽聽聽聽聽聽聽聽聽聽聽at android.app.ActivityThread.main(ActivityThread.java:5335)
聽聽聽聽聽聽聽聽聽聽聽聽at java.lang.reflect.Method.invokeNative(Native Method)
聽聽聽聽聽聽聽聽聽聽聽聽at java.lang.reflect.Method.invoke(Method.java:515)
聽聽聽聽聽聽聽聽聽聽聽聽at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
聽聽聽聽聽聽聽聽聽聽聽聽at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
聽聽聽聽聽聽聽聽聽聽聽聽at dalvik.system.NativeStart.main(Native Method)
@alex-soft-r do you have any special drawer implementation?
have you cleaned your workspace?
im found problem
in new layouts files u set "colors" like android:background="?material_drawer_background"
and if we change "?" to "@color" all is good ( android:background="@color/material_drawer_background")
@alex-soft-r @jimok82 so you both don't use the provided theme?
my theme is "parent="Theme.AppCompat.Light.DarkActionBar">"
Yeah i see. If you use the provided theme (the MaterialDrawer.* themes) then it will work.
@alex-soft-r @jimok82 if you don't use the provided theme. or don't want to use / don't like to use you have to add following attributes to your style:
<!-- MaterialDrawer specific values -->
<item name="material_drawer_window_background">@color/material_drawer_window_background</item>
<item name="material_drawer_background">@color/material_drawer_background</item>
<item name="material_drawer_icons">@color/material_drawer_icons</item>
<item name="material_drawer_primary_text">@color/material_drawer_primary_text</item>
<item name="material_drawer_secondary_text">@color/material_drawer_secondary_text</item>
<item name="material_drawer_hint_text">@color/material_drawer_hint_text</item>
<item name="material_drawer_divider">@color/material_drawer_divider</item>
<item name="material_drawer_selected">@color/material_drawer_selected</item>
<item name="material_drawer_selected_text">@color/material_drawer_selected_text</item>
<item name="material_drawer_header_selection_text">@color/material_drawer_icons</item>
@mikepenz - im confirm, all work ;) thanks
@alex-soft-r thanks for help. i've added a note about this to the README.md
Most helpful comment
im found problem
in new layouts files u set "colors" like android:background="?material_drawer_background"
and if we change "?" to "@color" all is good ( android:background="@color/material_drawer_background")