遇到bug,java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.moke_demo6/com.example.moke_demo6.MainActivity}: android.view.InflateException: Binary XML file line #22: Error inflating class com.example.moke_demo6.ChangeColorWithText
這個(gè)是我的工程,我的xml?文件中的自定義的控件如下:
?<com.example.moke_demo6.ChangeColorWithText
??????????? android:layout_width="0dp"
??????????? android:layout_height="match_parent"
??????????? android:layout_weight="1"
??????????? android:padding="5dp"
??????????? hyman:icon="@drawable/ic_menu_start_conversation"
??????????? hyman:text="@string/app_name"
??????????? hyman:text_size="12sp"
??????????? hyman:color="#ff45c01a" />
感覺(jué)沒(méi)有寫(xiě)錯(cuò)啊,并且構(gòu)造函數(shù)我是寫(xiě)了三個(gè),為什么
還會(huì)報(bào)這種錯(cuò)誤:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.moke_demo6/com.example.moke_demo6.MainActivity}: android.view.InflateException: Binary XML file line #22: Error inflating class com.example.moke_demo6.ChangeColorWithText
解了一天還是沒(méi)有找到,求大神幫助啊
謝謝啊