Я получаю следующее исключение
02-15 15: 54: 01.860 15393-15393 / com.neml.auctions E / AndroidRuntime: FATAL EXCEPTION: main Процесс: com.neml.auctions,PID: 15393 android.view.InflateException: строка двоичного XML-файла # 0: ошибка надувания класса Button в android.view.LayoutInflater.createViewFromTag (LayoutInflater.java:719) в android.view.LayoutInflater.rInflate (LayoutInflater.java:761)на android.view.LayoutInflater.rInflate (LayoutInflater.java:769) на android.view.LayoutInflater.rInflate (LayoutInflater.java:769) на android.view.LayoutInflater.inflate (LayoutInflater.java:498) на android.view.LayoutInflater.inflate (LayoutInflater.java:398) в android.view.LayoutInflater.inflate (LayoutInflater.java:354) в com.neml.auctions.fragments.AuctionDetailsFragment.onCreateView (AuctionDetailsFragment.java4suort) и atort.app.Fragment.performCreateView (Fragment.java:2239) на android.support.v4.app.FragmentManagerImpl.moveToState (FragmentManager.java:1332) на Android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState (FragmentManager.java:1574) в android.support.v4.app.FragmentManagerImpl.moveToState (FragmentManager.java:1641) в android.support.v4.ckOckSecordSecordSecords.java: 794) в android.support.v4.app.FragmentManagerImpl.executeOps (FragmentManager.java:2415) в android.support.v4.app.FragmentManagerImpl.executeOpsTogether (FragmentManager.java:2200) в android.suort.app.на android.support.v4.app.FragmentStatePagerAdapter.finishUpdate (FragmentStatePagerAdapter.java:166) на android.support.v4.view.ViewPager.populate (ViewPager.java:1239) на android.support.v4.view.ViewPager.populate(ViewPager.java:1087) на android.support.v4.view.ViewPager.onMeasure (ViewPager.java:1613) в android.view.View.measure (View.java:17327) в android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:5363) в android.widget.LinearLayout.measureChildBeforeLayout (LinearLayout.java:) в android.widget.LinearLayout.measureVertical (LinearLayout.java:695) в android.widget.LinearLayout.onMeasure (LinearLayout.java:588) в android.view.View.measure (View.java:17327) в android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:5363) в android.widget.FrameLayout.onMeasure (FrameLayout.java:310) в android.support.v7.widget.ContentFrameLayout.onMeasure (ContentFrameL13out) javaView.measure (View.java:17327) в android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:5363) в android.widget.LinearLayout.measureChildBeforeLayout (LinearLayout.java:1410) в android.widout.Layar.Layar.Larar.java: 695) на android.widget.LinearLayout.onMeasure (LinearLayout.java:588) на android.view.View.measure (View.java:17327) на android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:5363) в android.widget.FrameLayout.onMeasure (FrameLayout.java:310) в android.view.View.measure (View.java:17327) в android.view.ViewGroup.measureghild(ViewGroup.588) на android.view.View.measure (View.java:17327)на android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:5363) на android.widget.FrameLayout.onMeasure (FrameLayout.java:310) на com.android.internal.policy.impl.PhoneWindow $ DecorView.onMeasure (телефонное окно: 2548) на android.view.View.measure (View.java:17327) на android.view.ViewRootImpl.performMeasure (ViewRootImpl.java:2277) на android.view.ViewRootImpl.measureHierarchy (ViewRootImpl.java:1391) на андроиде.view.ViewRootImpl.performTraversals (ViewRootImpl.java:1590) в android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:1249) в android.view.ViewRootImpl $ TraversalRunnable.run (ViewRootI.vi.29)1004 *
Вот код для макета, который я использую
<Button
android:id="@+id/bt_fragment_auc_details_sessions"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_gravity="right"
android:layout_marginTop="@dimen/layout_top_bottom_margin"
android:background="@drawable/button_session_selector"
android:drawableLeft="@drawable/ic_session"
android:drawablePadding="@dimen/edittext_padding"
android:text="@string/sessions"
android:textColor="@color/white" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/layout_top_bottom_margin"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/layout_top_bottom_margin"
android:layout_marginBottom="@dimen/layout_top_bottom_margin"
android:paddingTop="@dimen/textview_padding"
android:text="@string/contract_details"
android:textColor="@color/colorPrimary"
android:textSize="@dimen/fragment_auction_floor_qty_value_text_size" />
<ListView
android:id="@+id/lv_fragment_auction_details_contract_details"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
button_session_selector.xml
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/button_session_bg_pressed" android:state_pressed="true"/>
<item android:drawable="@drawable/button_session_bg_pressed" android:state_focused="true"/>
<item android:drawable="@drawable/button_session_bg"/>
</selector>
button_session_bg_pressed.xml
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid
android:color="@color/colorPrimaryDark"/>
<corners android:radius="@dimen/card_radius"
/>
<padding
android:left="@dimen/edittext_padding"
android:right="@dimen/edittext_padding"
/>
</shape>
</item>
</layer-list>
button_session_bg.xml
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="@color/colorAccent" />
<corners android:radius="@dimen/card_radius" />
<padding
android:left="@dimen/edittext_padding"
android:right="@dimen/edittext_padding"
>
</padding>
</shape>
</item>
</layer-list>
Удаление или добавление <?xml version="1.0" encoding="utf-8"?>
не помогает.Любая помощь будет оценена.