Repository: wdullaer/MaterialDateTimePicker

Issue #416: Layout inflate Error on 4.4.2 (api 19)
Created: 2017-10-19T14:42:23Z
Hi,
I tried testing the datetime picker on a device running an old OS, though no errors occur when I run it on newer devices.
Device: Tecno J7
OS: 4.4.2 (api 19)
I'm creating a dialog like this
Calendar now = Calendar.getInstance();
DatePickerDialog dpd = DatePickerDialog.newInstance(this,
    now.get(Calendar.YEAR),
    now.get(Calendar.MONTH),
    now.get(Calendar.DAY_OF_MONTH)
);
dpd.setMinDate(now);
dpd.setTitle(date);
dpd.setCancelable(true);
dpd.setVersion(DatePickerDialog.Version.VERSION_2);
dpd.show(getActivity().getFragmentManager(), "Date Picker Dialog");

And I got this error...
Fatal Exception: android.view.InflateException: Binary XML file line #26: Error inflating class Button
       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:713)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
       at android.view.LayoutInflater.parseInclude(LayoutInflater.java:839)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:745)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
       at com.wdullaer.materialdatetimepicker.date.DatePickerDialog.onCreateView(DatePickerDialog.java:318)
       at android.app.Fragment.performCreateView(Fragment.java:1700)
       at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:890)
       at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1062)
       at android.app.BackStackRecord.run(BackStackRecord.java:698)
       at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1447)
       at android.app.FragmentManagerImpl$1.run(FragmentManager.java:443)
       at android.os.Handler.handleCallback(Handler.java:808)
       at android.os.Handler.dispatchMessage(Handler.java:103)
       at android.os.Looper.loop(Looper.java:193)
       at android.app.ActivityThread.main(ActivityThread.java:5323)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:515)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
       at dalvik.system.NativeStart.main(NativeStart.java)
Caused by java.lang.IndexOutOfBoundsException
       at android.content.res.StringBlock.nativeGetString(StringBlock.java)
       at android.content.res.StringBlock.get(StringBlock.java:82)
       at android.content.res.AssetManager.getPooledString(AssetManager.java:288)
       at android.content.res.TypedArray.loadStringValueAt(TypedArray.java:727)
       at android.content.res.TypedArray.getString(TypedArray.java:125)
       at android.widget.TextView.<init>(TextView.java:1002)
       at android.widget.Button.<init>(Button.java:107)
       at android.support.v7.widget.AppCompatButton.<init>(AppCompatButton.java:71)
       at android.support.v7.widget.AppCompatButton.<init>(AppCompatButton.java:67)
       at android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:109)
       at android.support.v7.app.AppCompatDelegateImplV9.createView(AppCompatDelegateImplV9.java:1024)
       at android.support.v7.app.AppCompatDelegateImplV9.onCreateView(AppCompatDelegateImplV9.java:1081)
       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:684)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
       at android.view.LayoutInflater.parseInclude(LayoutInflater.java:839)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:745)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
       at com.wdullaer.materialdatetimepicker.date.DatePickerDialog.onCreateView(DatePickerDialog.java:318)
       at android.app.Fragment.performCreateView(Fragment.java:1700)
       at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:890)
       at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1062)
       at android.app.BackStackRecord.run(BackStackRecord.java:698)
       at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1447)
       at android.app.FragmentManagerImpl$1.run(FragmentManager.java:443)
       at android.os.Handler.handleCallback(Handler.java:808)
       at android.os.Handler.dispatchMessage(Handler.java:103)
       at android.os.Looper.loop(Looper.java:193)
       at android.app.ActivityThread.main(ActivityThread.java:5323)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:515)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
       at dalvik.system.NativeStart.main(NativeStart.java)

Duplicate issue #362: Unexpected crash on API 16
Created: 2017-06-05T09:54:03Z
FATAL EXCEPTION: main
android.view.InflateException: Binary XML file line #37: Error inflating class TextView
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
at android.view.LayoutInflater.parseInclude(LayoutInflater.java:830)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:736)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at com.wdullaer.materialdatetimepicker.date.DatePickerDialog.onCreateView(DatePickerDialog.java:318)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:829)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1035)
at android.app.BackStackRecord.run(BackStackRecord.java:635)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1397)
at android.app.FragmentManagerImpl$1.run(FragmentManager.java:426)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ArrayIndexOutOfBoundsException: length=23; index=1194
at android.content.res.StringBlock.get(StringBlock.java:64)
at android.content.res.XmlBlock$Parser.getPooledString(XmlBlock.java:458)
at android.content.res.TypedArray.loadStringValueAt(TypedArray.java:720)
at android.content.res.TypedArray.getString(TypedArray.java:124)
at android.widget.TextView.(TextView.java:792)
at android.support.v7.widget.AppCompatTextView.(AppCompatTextView.java:62)
at android.support.v7.widget.AppCompatTextView.(AppCompatTextView.java:58)
at android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:103)
at android.support.v7.app.AppCompatDelegateImplV9.createView(AppCompatDelegateImplV9.java:1029)
at android.support.v7.app.AppCompatDelegateImplV9.onCreateView(AppCompatDelegateImplV9.java:1087)
at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:47)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:675)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:746) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:749) 
at android.view.LayoutInflater.parseInclude(LayoutInflater.java:830) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:736) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:749) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:489) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:396) 
at com.wdullaer.materialdatetimepicker.date.DatePickerDialog.onCreateView(DatePickerDialog.java:318) 
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:829) 
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1035) 
at android.app.BackStackRecord.run(BackStackRecord.java:635) 
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1397) 
at android.app.FragmentManagerImpl$1.run(FragmentManager.java:426) 
at android.os.Handler.handleCallback(Handler.java:615) 
at android.os.Handler.dispatchMessage(Handler.java:92) 
at android.os.Looper.loop(Looper.java:137) 
at android.app.ActivityThread.main(ActivityThread.java:4745) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:511) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) 
at dalvik.system.NativeStart.main(Native Method) 

Closing comment (2017-10-29T15:47:37Z): Duplicate of #416
I'll track progress on this in that issue