2017-04-11 18 views
0

此代碼與Lollipop波紋管正常工作。但對於Marshmallow,我得到充氣錯誤,因爲的錯誤膨脹爲棉花糖的背景Drawables

android:background="@drawable/border_box_gray" 

-

這是border_box_ray xml文件

<?xml version="1.0" encoding="utf-8"?> 
<shape xmlns:android="http://schemas.android.com/apk/res/android"android:shape="rectangle" > 
<solid android:color="#202020" /> 
<stroke android:width="1dip" android:color="#9b9b9b"/> 
</shape> 

我沒有app:srcCompatGradle。但我不知道如何解決此問題。

+0

什麼是分隔符可繪製? –

+0

show'@ drawable/divider' –

回答

0

看起來你忘了在之前放一個空格android:shape

+0

其中,android:shape =「rectangle」 – Aizen

+0

xmlns:android =「http://schemas.android.com/apk/res/android」android:shape =「rectangle」。 < - 此行在android:shape =「rectangle」之前必須有一個間距。現在,你用一句話把所有東西聯合起來。 –

+0

它只在這個Stackoverflow編輯器上,它在xml上分離 – Aizen